17405867cSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
27405867cSopenharmony_ci<!-- Copyright (c) 2024 Huawei Device Co., Ltd.
37405867cSopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
47405867cSopenharmony_ci     you may not use this file except in compliance with the License.
57405867cSopenharmony_ci     You may obtain a copy of the License at
67405867cSopenharmony_ci
77405867cSopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
87405867cSopenharmony_ci
97405867cSopenharmony_ci     Unless required by applicable law or agreed to in writing, software
107405867cSopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
117405867cSopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
127405867cSopenharmony_ci     See the License for the specific language governing permissions and
137405867cSopenharmony_ci     limitations under the License.
147405867cSopenharmony_ci-->
157405867cSopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide:
167405867cSopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location.
177405867cSopenharmony_cilicensefile:
187405867cSopenharmony_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.
197405867cSopenharmony_ci
207405867cSopenharmony_citasklist(only for batch mode):
217405867cSopenharmony_ci1. task: Define oat check thread, each task will start a new thread.
227405867cSopenharmony_ci2. task name: Only an name, no practical effect.
237405867cSopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
247405867cSopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
257405867cSopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project.
267405867cSopenharmony_ci
277405867cSopenharmony_cipolicyList:
287405867cSopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
297405867cSopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
307405867cSopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
317405867cSopenharmony_ci3. policyitem type:
327405867cSopenharmony_ci    "compatibility" is used to check license compatibility in the specified path;
337405867cSopenharmony_ci    "license" is used to check source license header in the specified path;
347405867cSopenharmony_ci    "copyright" is used to check source copyright header in the specified path;
357405867cSopenharmony_ci    "import" is used to check source dependency in the specified path, such as import ... ,include ...
367405867cSopenharmony_ci    "filetype" is used to check file type in the specified path, supported file types: archive, binary
377405867cSopenharmony_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
387405867cSopenharmony_ci
397405867cSopenharmony_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.
407405867cSopenharmony_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.
417405867cSopenharmony_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.
427405867cSopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules.
437405867cSopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
447405867cSopenharmony_ci
457405867cSopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules:
467405867cSopenharmony_ci" == &gt;
477405867cSopenharmony_ci& == &gt;
487405867cSopenharmony_ci' == &gt;
497405867cSopenharmony_ci< == &gt;
507405867cSopenharmony_ci> == &gt;
517405867cSopenharmony_ci-->
527405867cSopenharmony_ci<configuration>
537405867cSopenharmony_ci    <oatconfig>
547405867cSopenharmony_ci        <filefilterlist>
557405867cSopenharmony_ci            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
567405867cSopenharmony_ci                <filteritem type="filepath" name="figures/.*" desc="self developed pictures used in readme documents"/>
577405867cSopenharmony_ci            </filefilter>
587405867cSopenharmony_ci        </filefilterlist>
597405867cSopenharmony_ci    </oatconfig>
607405867cSopenharmony_ci</configuration>
61