10c6be5a6Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 20c6be5a6Sopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd. 30c6be5a6Sopenharmony_ci 40c6be5a6Sopenharmony_ci Licensed under the Apache License, Version 2.0 (the "License"); 50c6be5a6Sopenharmony_ci you may not use this file except in compliance with the License. 60c6be5a6Sopenharmony_ci You may obtain a copy of the License at 70c6be5a6Sopenharmony_ci 80c6be5a6Sopenharmony_ci http://www.apache.org/licenses/LICENSE-2.0 90c6be5a6Sopenharmony_ci 100c6be5a6Sopenharmony_ci Unless required by applicable law or agreed to in writing, software 110c6be5a6Sopenharmony_ci distributed under the License is distributed on an "AS IS" BASIS, 120c6be5a6Sopenharmony_ci WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 130c6be5a6Sopenharmony_ci See the License for the specific language governing permissions and 140c6be5a6Sopenharmony_ci limitations under the License. 150c6be5a6Sopenharmony_ci 160c6be5a6Sopenharmony_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. 170c6be5a6Sopenharmony_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. 180c6be5a6Sopenharmony_ci 190c6be5a6Sopenharmony_ci licensefile: 200c6be5a6Sopenharmony_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. 210c6be5a6Sopenharmony_ci 220c6be5a6Sopenharmony_ci policylist: 230c6be5a6Sopenharmony_ci 1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here. 240c6be5a6Sopenharmony_ci 2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is: 250c6be5a6Sopenharmony_ci <policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/> 260c6be5a6Sopenharmony_ci 3. policyitem type: 270c6be5a6Sopenharmony_ci "compatibility" is used to check license compatibility in the specified path; 280c6be5a6Sopenharmony_ci "license" is used to check source license header in the specified path; 290c6be5a6Sopenharmony_ci "copyright" is used to check source copyright header in the specified path; 300c6be5a6Sopenharmony_ci "import" is used to check source dependency in the specified path, such as import ... ,include ... 310c6be5a6Sopenharmony_ci "filetype" is used to check file type in the specified path, supported file types: archive, binary 320c6be5a6Sopenharmony_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 330c6be5a6Sopenharmony_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. 340c6be5a6Sopenharmony_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. 350c6be5a6Sopenharmony_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. 360c6be5a6Sopenharmony_ci 7. policyitem filefilter: Used to bind filefilter which define filter rules. 370c6be5a6Sopenharmony_ci 7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code. 380c6be5a6Sopenharmony_ci 8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path. 390c6be5a6Sopenharmony_ci 400c6be5a6Sopenharmony_ci Note:If the text contains special characters, please escape them according to the following rules: 410c6be5a6Sopenharmony_ci " == " 420c6be5a6Sopenharmony_ci & == & 430c6be5a6Sopenharmony_ci ' == ' 440c6be5a6Sopenharmony_ci < == < 450c6be5a6Sopenharmony_ci > == > 460c6be5a6Sopenharmony_ci--> 470c6be5a6Sopenharmony_ci 480c6be5a6Sopenharmony_ci<configuration> 490c6be5a6Sopenharmony_ci <oatconfig> 500c6be5a6Sopenharmony_ci <licensefile></licensefile> 510c6be5a6Sopenharmony_ci <policylist> 520c6be5a6Sopenharmony_ci <policy name="projectPolicy" desc=""> 530c6be5a6Sopenharmony_ci <policyitem type="compatibility" path="BUILD.gn" desc="They are used in dynamic link mode."/> 540c6be5a6Sopenharmony_ci <policyitem type="compatibility" path="install.sh" desc="They are used in dynamic link mode."/> 550c6be5a6Sopenharmony_ci <policyitem type="compatibility" path="re2.spec" desc="They are used in dynamic link mode."/> 560c6be5a6Sopenharmony_ci </policy> 570c6be5a6Sopenharmony_ci </policylist> 580c6be5a6Sopenharmony_ci <filefilterlist> 590c6be5a6Sopenharmony_ci <filefilter name="defaultFilter" desc="Files not to check"> 600c6be5a6Sopenharmony_ci <filteritem type="filename" name="*.8|*.png|*.sym" desc="desc files"/> 610c6be5a6Sopenharmony_ci <filteritem type="filepath" name="tests/.*" desc="Test files"/> 620c6be5a6Sopenharmony_ci </filefilter> 630c6be5a6Sopenharmony_ci <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies"> 640c6be5a6Sopenharmony_ci </filefilter> 650c6be5a6Sopenharmony_ci <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies"> 660c6be5a6Sopenharmony_ci </filefilter> 670c6be5a6Sopenharmony_ci <filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies"> 680c6be5a6Sopenharmony_ci </filefilter> 690c6be5a6Sopenharmony_ci <filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies"> 700c6be5a6Sopenharmony_ci </filefilter> 710c6be5a6Sopenharmony_ci <filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies"> 720c6be5a6Sopenharmony_ci </filefilter> 730c6be5a6Sopenharmony_ci <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies"> 740c6be5a6Sopenharmony_ci </filefilter> 750c6be5a6Sopenharmony_ci </filefilterlist> 760c6be5a6Sopenharmony_ci </oatconfig> 770c6be5a6Sopenharmony_ci</configuration>