179a732c7Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
279a732c7Sopenharmony_ci<!-- Copyright (c) 2022 Huawei Device Co., Ltd.
379a732c7Sopenharmony_ci
479a732c7Sopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
579a732c7Sopenharmony_ci     you may not use this file except in compliance with the License.
679a732c7Sopenharmony_ci     You may obtain a copy of the License at
779a732c7Sopenharmony_ci
879a732c7Sopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
979a732c7Sopenharmony_ci
1079a732c7Sopenharmony_ci     Unless required by applicable law or agreed to in writing, software
1179a732c7Sopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
1279a732c7Sopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1379a732c7Sopenharmony_ci     See the License for the specific language governing permissions and
1479a732c7Sopenharmony_ci     limitations under the License.
1579a732c7Sopenharmony_ci    -->
1679a732c7Sopenharmony_ci<!--
1779a732c7Sopenharmony_ci     Notes:
1879a732c7Sopenharmony_ci     This is project config file for OpenHarmony OSS Audit Tool, if you have any questions or concerns, please email chenyaxun.
1979a732c7Sopenharmony_ci-->
2079a732c7Sopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide:
2179a732c7Sopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location.
2279a732c7Sopenharmony_cilicensefile:
2379a732c7Sopenharmony_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.
2479a732c7Sopenharmony_ci
2579a732c7Sopenharmony_citasklist(only for batch mode):
2679a732c7Sopenharmony_ci1. task: Define oat check thread, each task will start a new thread.
2779a732c7Sopenharmony_ci2. task name: Only an name, no practical effect.
2879a732c7Sopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
2979a732c7Sopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
3079a732c7Sopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project.
3179a732c7Sopenharmony_ci
3279a732c7Sopenharmony_ci
3379a732c7Sopenharmony_cipolicyList:
3479a732c7Sopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
3579a732c7Sopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
3679a732c7Sopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
3779a732c7Sopenharmony_ci3. policyitem type:
3879a732c7Sopenharmony_ci    "compatibility" is used to check license compatibility in the specified path;
3979a732c7Sopenharmony_ci    "license" is used to check source license header in the specified path;
4079a732c7Sopenharmony_ci    "copyright" is used to check source copyright header in the specified path;
4179a732c7Sopenharmony_ci    "import" is used to check source dependency in the specified path, such as import ... ,include ...
4279a732c7Sopenharmony_ci    "filetype" is used to check file type in the specified path, supported file types: archive, binary
4379a732c7Sopenharmony_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
4479a732c7Sopenharmony_ci
4579a732c7Sopenharmony_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.
4679a732c7Sopenharmony_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.
4779a732c7Sopenharmony_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.
4879a732c7Sopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules.
4979a732c7Sopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
5079a732c7Sopenharmony_ci
5179a732c7Sopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules:
5279a732c7Sopenharmony_ci" == &gt;
5379a732c7Sopenharmony_ci& == &gt;
5479a732c7Sopenharmony_ci' == &gt;
5579a732c7Sopenharmony_ci< == &gt;
5679a732c7Sopenharmony_ci> == &gt;
5779a732c7Sopenharmony_ci-->
5879a732c7Sopenharmony_ci<configuration>
5979a732c7Sopenharmony_ci    <oatconfig>
6079a732c7Sopenharmony_ci        <filefilterlist>
6179a732c7Sopenharmony_ci            <filefilter name="appIconPolicyFilter" desc="Filters for app icon" >
6279a732c7Sopenharmony_ci                <filteritem type="filepath" name="display/entry/src/main/resources/base/media/.*" desc="pictures used for app icon"/>
6379a732c7Sopenharmony_ci                <filteritem type="filepath" name="figures/.*" desc="pictures used to display project structure"/>
6479a732c7Sopenharmony_ci            </filefilter>
6579a732c7Sopenharmony_ci            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for project binary file" >
6679a732c7Sopenharmony_ci                <filteritem type="filepath" name="figures/devicemanager_zh.png" desc="pictures used to display project structure"/>
6779a732c7Sopenharmony_ci                <filteritem type="filepath" name="figures/devicemanager_en.png" desc="pictures used to display project structure"/>
6879a732c7Sopenharmony_ci                <filteritem type="filepath" name="display/entry/src/main/resources/base/media/icon.png" desc="pictures used for app icon"/>
6979a732c7Sopenharmony_ci                <filteritem type="filepath" name="display/AppScope/resources/base/media/app_icon.png" desc="pictures used for app icon"/>
7079a732c7Sopenharmony_ci            </filefilter>
7179a732c7Sopenharmony_ci        </filefilterlist>
7279a732c7Sopenharmony_ci    </oatconfig>
7379a732c7Sopenharmony_ci</configuration>
74