15eec62ecSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 25eec62ecSopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd. 35eec62ecSopenharmony_ci 45eec62ecSopenharmony_ci Licensed under the Apache License, Version 2.0 (the "License"); 55eec62ecSopenharmony_ci you may not use this file except in compliance with the License. 65eec62ecSopenharmony_ci You may obtain a copy of the License at 75eec62ecSopenharmony_ci 85eec62ecSopenharmony_ci http://www.apache.org/licenses/LICENSE-2.0 95eec62ecSopenharmony_ci 105eec62ecSopenharmony_ci Unless required by applicable law or agreed to in writing, software 115eec62ecSopenharmony_ci distributed under the License is distributed on an "AS IS" BASIS, 125eec62ecSopenharmony_ci WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 135eec62ecSopenharmony_ci See the License for the specific language governing permissions and 145eec62ecSopenharmony_ci limitations under the License. 155eec62ecSopenharmony_ci 165eec62ecSopenharmony_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. 175eec62ecSopenharmony_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. 185eec62ecSopenharmony_ci 195eec62ecSopenharmony_ci licensefile: 205eec62ecSopenharmony_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. 215eec62ecSopenharmony_ci 225eec62ecSopenharmony_ci policylist: 235eec62ecSopenharmony_ci 1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here. 245eec62ecSopenharmony_ci 2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is: 255eec62ecSopenharmony_ci <policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/> 265eec62ecSopenharmony_ci 3. policyitem type: 275eec62ecSopenharmony_ci "compatibility" is used to check license compatibility in the specified path; 285eec62ecSopenharmony_ci "license" is used to check source license header in the specified path; 295eec62ecSopenharmony_ci "copyright" is used to check source copyright header in the specified path; 305eec62ecSopenharmony_ci "import" is used to check source dependency in the specified path, such as import ... ,include ... 315eec62ecSopenharmony_ci "filetype" is used to check file type in the specified path, supported file types: archive, binary 325eec62ecSopenharmony_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 335eec62ecSopenharmony_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. 345eec62ecSopenharmony_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. 355eec62ecSopenharmony_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. 365eec62ecSopenharmony_ci 7. policyitem filefilter: Used to bind filefilter which define filter rules. 375eec62ecSopenharmony_ci 7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code. 385eec62ecSopenharmony_ci 8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path. 395eec62ecSopenharmony_ci 405eec62ecSopenharmony_ci Note:If the text contains special characters, please escape them according to the following rules: 415eec62ecSopenharmony_ci " == > 425eec62ecSopenharmony_ci & == > 435eec62ecSopenharmony_ci ' == > 445eec62ecSopenharmony_ci < == > 455eec62ecSopenharmony_ci > == > 465eec62ecSopenharmony_ci--> 475eec62ecSopenharmony_ci 485eec62ecSopenharmony_ci<configuration> 495eec62ecSopenharmony_ci <oatconfig> 505eec62ecSopenharmony_ci <policylist> 515eec62ecSopenharmony_ci <policy name="projectPolicy" desc=""> 525eec62ecSopenharmony_ci <policyitem type="copyright" name="Copyright 2015 the original author or authors." path="gradlew" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="file generated by development tool"/> 535eec62ecSopenharmony_ci <policyitem type="copyright" name="Copyright 2015 the original author or authors." path="gradlew.bat" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="file generated by development tool"/> 545eec62ecSopenharmony_ci </policy> 555eec62ecSopenharmony_ci </policylist> 565eec62ecSopenharmony_ci <filefilterlist> 575eec62ecSopenharmony_ci <filefilter name="defaultFilter" desc="Files not to check"> 585eec62ecSopenharmony_ci <filteritem type="filepath" name=".*.json5" desc="build config file"/> 595eec62ecSopenharmony_ci <filteritem type="filepath" name="AppScope/.*.json5" desc="build config file"/> 605eec62ecSopenharmony_ci <filteritem type="filepath" name="entry/.*.json5" desc="build config file"/> 615eec62ecSopenharmony_ci <filteritem type="filepath" name="entry/src/main/.*.json5" desc="build config file"/> 625eec62ecSopenharmony_ci </filefilter> 635eec62ecSopenharmony_ci <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies"> 645eec62ecSopenharmony_ci <filteritem type="filepath" name="AppScope/resources/base/media/.*.png" desc="self developed image"/> 655eec62ecSopenharmony_ci <filteritem type="filepath" name="entry/src/main/resources/base/media/.*.png" desc="self developed image"/> 665eec62ecSopenharmony_ci <filteritem type="filepath" name="figures/.*.png" desc="self developed image"/> 675eec62ecSopenharmony_ci </filefilter> 685eec62ecSopenharmony_ci </filefilterlist> 695eec62ecSopenharmony_ci </oatconfig> 705eec62ecSopenharmony_ci</configuration>