1885b47fbSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
2885b47fbSopenharmony_ci<!-- Copyright (C) 2022 Huawei Device Co., Ltd.
3885b47fbSopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
4885b47fbSopenharmony_ci     you may not use this file except in compliance with the License.
5885b47fbSopenharmony_ci     You may obtain a copy of the License at
6885b47fbSopenharmony_ci
7885b47fbSopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
8885b47fbSopenharmony_ci
9885b47fbSopenharmony_ci     Unless required by applicable law or agreed to in writing, software
10885b47fbSopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
11885b47fbSopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12885b47fbSopenharmony_ci     See the License for the specific language governing permissions and
13885b47fbSopenharmony_ci     limitations under the License.
14885b47fbSopenharmony_ci-->
15885b47fbSopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide:
16885b47fbSopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location.
17885b47fbSopenharmony_cilicensefile:
18885b47fbSopenharmony_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.
19885b47fbSopenharmony_ci
20885b47fbSopenharmony_citasklist(only for batch mode):
21885b47fbSopenharmony_ci1. task: Define oat check thread, each task will start a new thread.
22885b47fbSopenharmony_ci2. task name: Only an name, no practical effect.
23885b47fbSopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
24885b47fbSopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
25885b47fbSopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project.
26885b47fbSopenharmony_ci
27885b47fbSopenharmony_ci
28885b47fbSopenharmony_cipolicyList:
29885b47fbSopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
30885b47fbSopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
31885b47fbSopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
32885b47fbSopenharmony_ci3. policyitem type:
33885b47fbSopenharmony_ci    "compatibility" is used to check license compatibility in the specified path;
34885b47fbSopenharmony_ci    "license" is used to check source license header in the specified path;
35885b47fbSopenharmony_ci    "copyright" is used to check source copyright header in the specified path;
36885b47fbSopenharmony_ci    "import" is used to check source dependency in the specified path, such as import ... ,include ...
37885b47fbSopenharmony_ci    "filetype" is used to check file type in the specified path, supported file types: archive, binary
38885b47fbSopenharmony_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
39885b47fbSopenharmony_ci
40885b47fbSopenharmony_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.
41885b47fbSopenharmony_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.
42885b47fbSopenharmony_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.
43885b47fbSopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules.
44885b47fbSopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
45885b47fbSopenharmony_ci
46885b47fbSopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules:
47885b47fbSopenharmony_ci" == &gt;
48885b47fbSopenharmony_ci& == &gt;
49885b47fbSopenharmony_ci' == &gt;
50885b47fbSopenharmony_ci< == &gt;
51885b47fbSopenharmony_ci> == &gt;
52885b47fbSopenharmony_ci-->
53885b47fbSopenharmony_ci<configuration>
54885b47fbSopenharmony_ci    <oatconfig>
55885b47fbSopenharmony_ci        <licensefile></licensefile>
56885b47fbSopenharmony_ci        <policylist>
57885b47fbSopenharmony_ci            <policy name="projectPolicy" desc="">
58885b47fbSopenharmony_ci            </policy>
59885b47fbSopenharmony_ci        </policylist>
60885b47fbSopenharmony_ci        <filefilterlist>
61885b47fbSopenharmony_ci            <filefilter name="defaultFilter" desc="Files not to check">
62885b47fbSopenharmony_ci                <filteritem type="filename" name="*.hap|*.rpk" desc="valid and invalid bundle files for tests"/>
63885b47fbSopenharmony_ci                <filteritem type="filepath" name="figures/.*" desc="Self-developed image"/>
64885b47fbSopenharmony_ci            </filefilter>
65885b47fbSopenharmony_ci        </filefilterlist>
66885b47fbSopenharmony_ci    </oatconfig>
67885b47fbSopenharmony_ci</configuration>
68