199ca880aSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
299ca880aSopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
399ca880aSopenharmony_ci
499ca880aSopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
599ca880aSopenharmony_ci     you may not use this file except in compliance with the License.
699ca880aSopenharmony_ci     You may obtain a copy of the License at
799ca880aSopenharmony_ci
899ca880aSopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
999ca880aSopenharmony_ci
1099ca880aSopenharmony_ci     Unless required by applicable law or agreed to in writing, software
1199ca880aSopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
1299ca880aSopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1399ca880aSopenharmony_ci     See the License for the specific language governing permissions and
1499ca880aSopenharmony_ci     limitations under the License.
1599ca880aSopenharmony_ci     
1699ca880aSopenharmony_ci     Notes:
1799ca880aSopenharmony_ci     This is project config file for OpenHarmony OSS Audit Tool, if you have any questions or concerns, please email chenyaxun.
1899ca880aSopenharmony_ci-->
1999ca880aSopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide:
2099ca880aSopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location.
2199ca880aSopenharmony_cilicensefile: 
2299ca880aSopenharmony_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.
2399ca880aSopenharmony_ci
2499ca880aSopenharmony_citasklist(only for batch mode):
2599ca880aSopenharmony_ci1. task: Define oat check thread, each task will start a new thread.
2699ca880aSopenharmony_ci2. task name: Only an name, no practical effect.
2799ca880aSopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
2899ca880aSopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
2999ca880aSopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project.
3099ca880aSopenharmony_ci
3199ca880aSopenharmony_ci
3299ca880aSopenharmony_cipolicyList:
3399ca880aSopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
3499ca880aSopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
3599ca880aSopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
3699ca880aSopenharmony_ci3. policyitem type:
3799ca880aSopenharmony_ci    "compatibility" is used to check license compatibility in the specified path; 
3899ca880aSopenharmony_ci    "license" is used to check source license header in the specified path;
3999ca880aSopenharmony_ci    "copyright" is used to check source copyright header in the specified path;
4099ca880aSopenharmony_ci    "import" is used to check source dependency in the specified path, such as import ... ,include ...
4199ca880aSopenharmony_ci    "filetype" is used to check file type in the specified path, supported file types: archive, binary
4299ca880aSopenharmony_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
4399ca880aSopenharmony_ci
4499ca880aSopenharmony_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. 
4599ca880aSopenharmony_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.
4699ca880aSopenharmony_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.
4799ca880aSopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules.
4899ca880aSopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
4999ca880aSopenharmony_ci
5099ca880aSopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules:
5199ca880aSopenharmony_ci" == &gt;
5299ca880aSopenharmony_ci& == &gt;
5399ca880aSopenharmony_ci' == &gt;
5499ca880aSopenharmony_ci< == &gt;
5599ca880aSopenharmony_ci> == &gt;
5699ca880aSopenharmony_ci-->
5799ca880aSopenharmony_ci<configuration>
5899ca880aSopenharmony_ci    <oatconfig> 
5999ca880aSopenharmony_ci        <licensefile>COPYING</licensefile>
6099ca880aSopenharmony_ci        <policylist>
6199ca880aSopenharmony_ci             <policy name="projectPolicy" desc="">
6299ca880aSopenharmony_ci                 <policyitem type="compatibility" name="FSFULLR|GPLStyleLicense-with-Libtool-exception" path="m4/libtool.m4" desc="经识别此文件License为FSFULLR,属于宽松型许可证,可以兼容"/>
6399ca880aSopenharmony_ci             </policy>
6499ca880aSopenharmony_ci        </policylist>
6599ca880aSopenharmony_ci        <filefilterlist>
6699ca880aSopenharmony_ci            <filefilter name="defaultFilter" desc="Files not to check">
6799ca880aSopenharmony_ci            </filefilter>
6899ca880aSopenharmony_ci            <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
6999ca880aSopenharmony_ci                <filteritem type="filename" name="README.OpenSource"/>
7099ca880aSopenharmony_ci                <filteritem type="filename" name="README"/>
7199ca880aSopenharmony_ci                <filteritem type="filename" name="COPYING" desc="未使用"/>
7299ca880aSopenharmony_ci                <filteritem type="filename" name="compile" desc="未使用"/>
7399ca880aSopenharmony_ci                <filteritem type="filename" name="config.*" desc="未使用"/>
7499ca880aSopenharmony_ci                <filteritem type="filename" name="*.sh" desc="未使用"/>
7599ca880aSopenharmony_ci                <filteritem type="filename" name="depcomp" desc="未使用"/>
7699ca880aSopenharmony_ci                <filteritem type="filename" name="missing" desc="未使用"/>
7799ca880aSopenharmony_ci                <filteritem type="filename" name="test-driver" desc="未使用"/>
7899ca880aSopenharmony_ci                <filteritem type="filename" name="rule_generator.functions" desc="未使用"/>
7999ca880aSopenharmony_ci                <filteritem type="filepath" name="man/.*" desc="未使用"/>
8099ca880aSopenharmony_ci                <filteritem type="filepath" name="src/ata_id/.*" desc="未使用"/>
8199ca880aSopenharmony_ci                <filteritem type="filepath" name="src/collect/.*" desc="未使用"/>
8299ca880aSopenharmony_ci                <filteritem type="filepath" name="src/scsi_id/.*" desc="未使用"/>
8399ca880aSopenharmony_ci                <filteritem type="filepath" name="src/cdrom_id/.*" desc="未使用"/>
8499ca880aSopenharmony_ci                <filteritem type="filepath" name="src/ata_id/.*" desc="未使用"/>
8599ca880aSopenharmony_ci                <filteritem type="filepath" name="src/libudev/.*" desc="使用了,被weston进程以动态链接方式调用"/>
8699ca880aSopenharmony_ci                <filteritem type="filepath" name="src/shared/.*" desc="使用了,被weston进程以动态链接方式调用"/>
8799ca880aSopenharmony_ci                <filteritem type="filepath" name="export_include/.*" desc="使用了,被weston进程以动态链接方式调用"/>
8899ca880aSopenharmony_ci                <filteritem type="filepath" name="src/mtd_probe/.*" desc="未使用"/>
8999ca880aSopenharmony_ci                <filteritem type="filepath" name="src/udev/.*" desc="使用但是是独立进程,被init进程调用,自研进程不受GPL影响"/>
9099ca880aSopenharmony_ci                <filteritem type="filepath" name="src/v4l_id/.*" desc="未使用"/>
9199ca880aSopenharmony_ci                <filteritem type="filepath" name="test/.*" desc="未使用"/>
9299ca880aSopenharmony_ci                <filteritem type="filepath" name="m4/libtool.m4" desc="经识别此文件License为FSFULLR,属于宽松型许可证,可以兼容"/>
9399ca880aSopenharmony_ci            </filefilter>
9499ca880aSopenharmony_ci            <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies" >
9599ca880aSopenharmony_ci                <filteritem type="filename" name="README.OpenSource"/>
9699ca880aSopenharmony_ci                <filteritem type="filename" name="README"/>
9799ca880aSopenharmony_ci            </filefilter>
9899ca880aSopenharmony_ci        </filefilterlist>
9999ca880aSopenharmony_ci    </oatconfig>
10099ca880aSopenharmony_ci</configuration>
101