180922886Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
280922886Sopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
380922886Sopenharmony_ci
480922886Sopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
580922886Sopenharmony_ci     you may not use this file except in compliance with the License.
680922886Sopenharmony_ci     You may obtain a copy of the License at
780922886Sopenharmony_ci
880922886Sopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
980922886Sopenharmony_ci
1080922886Sopenharmony_ci     Unless required by applicable law or agreed to in writing, software
1180922886Sopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
1280922886Sopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1380922886Sopenharmony_ci     See the License for the specific language governing permissions and
1480922886Sopenharmony_ci     limitations under the License.
1580922886Sopenharmony_ci
1680922886Sopenharmony_ci     Notes:
1780922886Sopenharmony_ci     This is project config file for OpenHarmony OSS Audit Tool, if you have any questions or concerns, please email chenyaxun@huawei.com.
1880922886Sopenharmony_ci-->
1980922886Sopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide:
2080922886Sopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location.
2180922886Sopenharmony_cilicensefile:
2280922886Sopenharmony_ci1.If the project don't have "LICENSE" in root dir, please define all the license files in this project in , OAT will check license files according to this rule.
2380922886Sopenharmony_ci
2480922886Sopenharmony_citasklist(only for batch mode):
2580922886Sopenharmony_ci1. task: Define oat check thread, each task will start a new thread.
2680922886Sopenharmony_ci2. task name: Only an name, no practical effect.
2780922886Sopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
2880922886Sopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
2980922886Sopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project.
3080922886Sopenharmony_ci
3180922886Sopenharmony_ci
3280922886Sopenharmony_cipolicyList:
3380922886Sopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
3480922886Sopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
3580922886Sopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
3680922886Sopenharmony_ci3. policyitem type:
3780922886Sopenharmony_ci    "compatibility" is used to check license compatibility in the specified path;
3880922886Sopenharmony_ci    "license" is used to check source license header in the specified path;
3980922886Sopenharmony_ci    "copyright" is used to check source copyright header in the specified path;
4080922886Sopenharmony_ci    "import" is used to check source dependency in the specified path, such as import ... ,include ...
4180922886Sopenharmony_ci    "filetype" is used to check file type in the specified path, supported file types: archive, binary
4280922886Sopenharmony_ci    "filename" is used to check whether the specified file exists in the specified path(support projectroot in default OAT.xml), supported file names: LICENSE, README, README.OpenSource
4380922886Sopenharmony_ci
4480922886Sopenharmony_ci4. policyitem name: This field is used for define the license, copyright, "*" means match all, the "!" prefix means could not match this value. For example, "!GPL" means can not use GPL license.
4580922886Sopenharmony_ci5. policyitem path: This field is used for define the source file scope to apply this policyitem, the "!" prefix means exclude the files. For example, "!.*/lib/.*" means files in lib dir will be exclude while process this policyitem.
4680922886Sopenharmony_ci6. policyitem rule and group: These two fields are used together to merge policy results. "may" policyitems in the same group means any one in this group passed, the result will be passed.
4780922886Sopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules.
4880922886Sopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
4980922886Sopenharmony_ci
5080922886Sopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules:
5180922886Sopenharmony_ci" == &gt;
5280922886Sopenharmony_ci& == &gt;
5380922886Sopenharmony_ci' == &gt;
5480922886Sopenharmony_ci< == &gt;
5580922886Sopenharmony_ci> == &gt;
5680922886Sopenharmony_ci-->
5780922886Sopenharmony_ci<configuration>
5880922886Sopenharmony_ci    <oatconfig>
5980922886Sopenharmony_ci        <filefilterlist>
6080922886Sopenharmony_ci            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
6180922886Sopenharmony_ci                <filteritem type="filepath" name="figures/.*" desc="Self-developed binary files, design framework diagrams or other resources used in code repository readme documents"/>
6280922886Sopenharmony_ci            </filefilter>
6380922886Sopenharmony_ci            <filefilter name="defaultFilter" desc="Json format files not to check">
6480922886Sopenharmony_ci                <filteritem type="filename" name="*.json|avsession.PNG|avsession_service.cfg" desc="json desc files"/>
6580922886Sopenharmony_ci            </filefilter>
6680922886Sopenharmony_ci        </filefilterlist>
6780922886Sopenharmony_ci    </oatconfig>
6880922886Sopenharmony_ci</configuration>
69