1c1d0c72aSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 2c1d0c72aSopenharmony_ci<!-- Copyright (c) 2021-2022 Huawei Device Co., Ltd. 3c1d0c72aSopenharmony_ci 4c1d0c72aSopenharmony_ci This software is licensed under the terms of the GNU General Public 5c1d0c72aSopenharmony_ci License version 2, as published by the Free Software Foundation, and 6c1d0c72aSopenharmony_ci may be copied, distributed, and modified under those terms. 7c1d0c72aSopenharmony_ci 8c1d0c72aSopenharmony_ci This program is distributed in the hope that it will be useful, 9c1d0c72aSopenharmony_ci but WITHOUT ANY WARRANTY; without even the implied warranty of 10c1d0c72aSopenharmony_ci MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11c1d0c72aSopenharmony_ci GNU General Public License for more details. 12c1d0c72aSopenharmony_ci--> 13c1d0c72aSopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide: 14c1d0c72aSopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location. 15c1d0c72aSopenharmony_cilicensefile: 16c1d0c72aSopenharmony_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. 17c1d0c72aSopenharmony_ci 18c1d0c72aSopenharmony_citasklist(only for batch mode): 19c1d0c72aSopenharmony_ci1. task: Define oat check thread, each task will start a new thread. 20c1d0c72aSopenharmony_ci2. task name: Only an name, no practical effect. 21c1d0c72aSopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist. 22c1d0c72aSopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist. 23c1d0c72aSopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project. 24c1d0c72aSopenharmony_ci 25c1d0c72aSopenharmony_ci 26c1d0c72aSopenharmony_cipolicyList: 27c1d0c72aSopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process. 28c1d0c72aSopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is: 29c1d0c72aSopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/> 30c1d0c72aSopenharmony_ci3. policyitem type: 31c1d0c72aSopenharmony_ci "compatibility" is used to check license compatibility in the specified path; 32c1d0c72aSopenharmony_ci "license" is used to check source license header in the specified path; 33c1d0c72aSopenharmony_ci "copyright" is used to check source copyright header in the specified path; 34c1d0c72aSopenharmony_ci "import" is used to check source dependency in the specified path, such as import ... ,include ... 35c1d0c72aSopenharmony_ci "filetype" is used to check file type in the specified path, supported file types: archive, binary 36c1d0c72aSopenharmony_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 37c1d0c72aSopenharmony_ci 38c1d0c72aSopenharmony_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. 39c1d0c72aSopenharmony_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. 40c1d0c72aSopenharmony_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. 41c1d0c72aSopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules. 42c1d0c72aSopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path. 43c1d0c72aSopenharmony_ci 44c1d0c72aSopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules: 45c1d0c72aSopenharmony_ci" == > 46c1d0c72aSopenharmony_ci& == > 47c1d0c72aSopenharmony_ci' == > 48c1d0c72aSopenharmony_ci< == > 49c1d0c72aSopenharmony_ci> == > 50c1d0c72aSopenharmony_ci--> 51c1d0c72aSopenharmony_ci<configuration> 52c1d0c72aSopenharmony_ci <oatconfig> 53c1d0c72aSopenharmony_ci <licensefile></licensefile> 54c1d0c72aSopenharmony_ci <policylist> 55c1d0c72aSopenharmony_ci <policy name="projectPolicy" desc=""> 56c1d0c72aSopenharmony_ci <policyitem type="license" name="GPL" path=".*" desc="linux kernel adapter codes"/> 57c1d0c72aSopenharmony_ci <policyitem type="copyright" name="Samsung Electronics Co.," path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="kernel codes"/> 58c1d0c72aSopenharmony_ci <policyitem type="copyright" name="Samsung Electronics" path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="kernel codes"/> 59c1d0c72aSopenharmony_ci <policyitem type="copyright" name="David Brownell" path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="kernel codes"/> 60c1d0c72aSopenharmony_ci <policyitem type="copyright" name="Agilent Technologies" path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="kernel codes"/> 61c1d0c72aSopenharmony_ci </policy> 62c1d0c72aSopenharmony_ci </policylist> 63c1d0c72aSopenharmony_ci <filefilterlist> 64c1d0c72aSopenharmony_ci <filefilter name="defaultFilter" desc="Files not to check"> 65c1d0c72aSopenharmony_ci <filteritem type="filename" name="*.lds|*.pod" desc="Building scripts"/> 66c1d0c72aSopenharmony_ci <filteritem type="filename" name="*.a|*.d|*.o|*.cmd|*.hcb|*.swp" desc="Intermediate products"/> 67c1d0c72aSopenharmony_ci </filefilter> 68c1d0c72aSopenharmony_ci </filefilterlist> 69c1d0c72aSopenharmony_ci </oatconfig> 70c1d0c72aSopenharmony_ci</configuration> 71