13c3173acSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 23c3173acSopenharmony_ci<!-- Copyright (c) 2022 Huawei Device Co., Ltd. 33c3173acSopenharmony_ci 43c3173acSopenharmony_ci Licensed under the Apache License, Version 2.0 (the "License"); 53c3173acSopenharmony_ci you may not use this file except in compliance with the License. 63c3173acSopenharmony_ci You may obtain a copy of the License at 73c3173acSopenharmony_ci 83c3173acSopenharmony_ci http://www.apache.org/licenses/LICENSE-2.0 93c3173acSopenharmony_ci 103c3173acSopenharmony_ci Unless required by applicable law or agreed to in writing, software 113c3173acSopenharmony_ci distributed under the License is distributed on an "AS IS" BASIS, 123c3173acSopenharmony_ci WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 133c3173acSopenharmony_ci See the License for the specific language governing permissions and 143c3173acSopenharmony_ci limitations under the License. 153c3173acSopenharmony_ci--> 163c3173acSopenharmony_ci 173c3173acSopenharmony_ci<!-- 183c3173acSopenharmony_ci This is the configuration file template for OpenHarmony OSS Audit Tool, please copy it to your project root dir and modify it refer to OpenHarmony/tools_oat/README. 193c3173acSopenharmony_ci All configurations in this file will be merged to OAT-Default.xml, if you have any questions or concerns, please create issue in OpenHarmony/tools_oat and @jalenchen or chenyaxun. 203c3173acSopenharmony_ci 213c3173acSopenharmony_ci licensefile: 223c3173acSopenharmony_ci 1.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. 233c3173acSopenharmony_ci 243c3173acSopenharmony_ci policylist: 253c3173acSopenharmony_ci 1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here. 263c3173acSopenharmony_ci 2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is: 273c3173acSopenharmony_ci <policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/> 283c3173acSopenharmony_ci 3. policyitem type: 293c3173acSopenharmony_ci "compatibility" is used to check license compatibility in the specified path; 303c3173acSopenharmony_ci "license" is used to check source license header in the specified path; 313c3173acSopenharmony_ci "copyright" is used to check source copyright header in the specified path; 323c3173acSopenharmony_ci "import" is used to check source dependency in the specified path, such as import ... ,include ... 333c3173acSopenharmony_ci "filetype" is used to check file type in the specified path, supported file types: archive, binary 343c3173acSopenharmony_ci "filename" is used to check whether the specified file exists in the specified path(projectroot means the root dir of the project), supported file names: LICENSE, README, README.OpenSource 353c3173acSopenharmony_ci 4. 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. 363c3173acSopenharmony_ci 5. 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. 373c3173acSopenharmony_ci 6. 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. 383c3173acSopenharmony_ci 7. policyitem filefilter: Used to bind filefilter which define filter rules. 393c3173acSopenharmony_ci 7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code. 403c3173acSopenharmony_ci 8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path. 413c3173acSopenharmony_ci 423c3173acSopenharmony_ci Note:If the text contains special characters, please escape them according to the following rules: 433c3173acSopenharmony_ci " == " 443c3173acSopenharmony_ci & == & 453c3173acSopenharmony_ci ' == ' 463c3173acSopenharmony_ci < == < 473c3173acSopenharmony_ci > == > 483c3173acSopenharmony_ci--> 493c3173acSopenharmony_ci 503c3173acSopenharmony_ci<configuration> 513c3173acSopenharmony_ci <oatconfig> 523c3173acSopenharmony_ci <licensefile></licensefile> 533c3173acSopenharmony_ci <policylist> 543c3173acSopenharmony_ci <policy name="projectPolicy" desc=""> 553c3173acSopenharmony_ci </policy> 563c3173acSopenharmony_ci </policylist> 573c3173acSopenharmony_ci 583c3173acSopenharmony_ci <filefilterlist> 593c3173acSopenharmony_ci <filefilter name="defaultFilter" desc="Files not to check"> 603c3173acSopenharmony_ci <filteritem type="filename" name="*.cfg|*.gni" desc="no need to add policy"/> 613c3173acSopenharmony_ci </filefilter> 623c3173acSopenharmony_ci <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies"> 633c3173acSopenharmony_ci </filefilter> 643c3173acSopenharmony_ci <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies"> 653c3173acSopenharmony_ci </filefilter> 663c3173acSopenharmony_ci <filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies"> 673c3173acSopenharmony_ci </filefilter> 683c3173acSopenharmony_ci <filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies"> 693c3173acSopenharmony_ci </filefilter> 703c3173acSopenharmony_ci <filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies"> 713c3173acSopenharmony_ci </filefilter> 723c3173acSopenharmony_ci <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies"> 733c3173acSopenharmony_ci </filefilter> 743c3173acSopenharmony_ci </filefilterlist> 753c3173acSopenharmony_ci </oatconfig> 763c3173acSopenharmony_ci</configuration> 77