15490a39dSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
25490a39dSopenharmony_ci<!-- Copyright (c) 2023 Huawei Device Co., Ltd.
35490a39dSopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
45490a39dSopenharmony_ci     you may not use this file except in compliance with the License.
55490a39dSopenharmony_ci     You may obtain a copy of the License at
65490a39dSopenharmony_ci
75490a39dSopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
85490a39dSopenharmony_ci
95490a39dSopenharmony_ci     Unless required by applicable law or agreed to in writing, software
105490a39dSopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
115490a39dSopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
125490a39dSopenharmony_ci     See the License for the specific language governing permissions and
135490a39dSopenharmony_ci     limitations under the License.
145490a39dSopenharmony_ci
155490a39dSopenharmony_ci     Notes:
165490a39dSopenharmony_ci     This is project config file for OpenHarmony OSS Audit Tool.
175490a39dSopenharmony_ci-->
185490a39dSopenharmony_ci<!-- OSS Audit Tool (OAT) configuration guide:
195490a39dSopenharmony_cibasedir: Root directory. the basedir + project path is the real source file location.
205490a39dSopenharmony_cilicensefile:
215490a39dSopenharmony_ci1.If the project does not have "LICENSE" in root dir, please define all the license files in this project in. OAT will check license files according to this rule.
225490a39dSopenharmony_ci
235490a39dSopenharmony_citasklist(for batch mode only):
245490a39dSopenharmony_ci1. task: OAT check check task. Each task will start a new thread.
255490a39dSopenharmony_ci2. task name: Name of the OAT check task.
265490a39dSopenharmony_ci3. task policy: Default policy for projects under this task. This field is mandatory and the specified policy must defined in policylist.
275490a39dSopenharmony_ci4. task filter: Default filefilter for projects under this task. This field is mandatory and the specified filefilter must defined in filefilterlist.
285490a39dSopenharmony_ci5. task project: Projects to be checked. The source root dir of the project is defined by the path field.
295490a39dSopenharmony_ci
305490a39dSopenharmony_ci
315490a39dSopenharmony_cipolicyList:
325490a39dSopenharmony_ci1. policy: All policyitems will be merged to default rules in OAT.xml. The policy name doesn't affect OAT check process.
335490a39dSopenharmony_ci2. policyitem: The fields type, name, path, desc are mandatory, and the fields rule, group, filefilter are optional. The default value is:
345490a39dSopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
355490a39dSopenharmony_ci3. policyitem type:
365490a39dSopenharmony_ci    "compatibility" is used to check license compatibility in the specified path;
375490a39dSopenharmony_ci    "license" is used to check source license header in the specified path;
385490a39dSopenharmony_ci    "copyright" is used to check source copyright header in the specified path;
395490a39dSopenharmony_ci    "import" is used to check source dependency in the specified path, such as import ... ,include ...
405490a39dSopenharmony_ci    "filetype" is used to check file type in the specified path, supported file types: archive, binary
415490a39dSopenharmony_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
425490a39dSopenharmony_ci
435490a39dSopenharmony_ci4. policyitem name: This field is used to define the license, copyright, "*" means to match all, the "!" prefix means a failure to match this value. For example, "!GPL" means a failure to use GPL license.
445490a39dSopenharmony_ci5. policyitem path: This field is used to define the source file scope to apply this policyitem. The "!" prefix means to exclude the files. For example, "!./lib/." means to exclude the files in lib dir while process this policyitem.
455490a39dSopenharmony_ci6. policyitem rule and group: These two fields are used together to merge policy results. "may" policyitems in the same group means that the result will be passed if any policyitem in this group is passed.
465490a39dSopenharmony_ci7. policyitem filefilter: This field is used to bind file filters, which defines filter rules.
475490a39dSopenharmony_ci8. filefilter: This field is used to define filter rules. Wherein, filename is used to filter file names and filepath is used to filter file path.
485490a39dSopenharmony_ci
495490a39dSopenharmony_ciNote: If the text contains special characters, please escape them according to the following rules:
505490a39dSopenharmony_ci" == &gt;
515490a39dSopenharmony_ci& == &gt;
525490a39dSopenharmony_ci' == &gt;
535490a39dSopenharmony_ci< == &gt;
545490a39dSopenharmony_ci> == &gt;
555490a39dSopenharmony_ci-->
565490a39dSopenharmony_ci<configuration>
575490a39dSopenharmony_ci    <oatconfig>
585490a39dSopenharmony_ci        <filefilterlist>
595490a39dSopenharmony_ci            <filefilter name="defaultFilter" desc="Files not to check">
605490a39dSopenharmony_ci                <filteritem type="filename" name="*.xml" desc="Configuration files"/>
615490a39dSopenharmony_ci            </filefilter>
625490a39dSopenharmony_ci            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies" >
635490a39dSopenharmony_ci                <filteritem type="filepath" name="figures/.*" desc="architecture figure binary."/>
645490a39dSopenharmony_ci                <filteritem type="filename" name="*.pcm" desc="Sample test files"/>
655490a39dSopenharmony_ci            </filefilter>
665490a39dSopenharmony_ci        </filefilterlist>
675490a39dSopenharmony_ci    </oatconfig>
685490a39dSopenharmony_ci</configuration>
69