1ba487d97Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 2ba487d97Sopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd. 3ba487d97Sopenharmony_ci 4ba487d97Sopenharmony_ci Licensed under the Apache License, Version 2.0 (the "License"); 5ba487d97Sopenharmony_ci you may not use this file except in compliance with the License. 6ba487d97Sopenharmony_ci You may obtain a copy of the License at 7ba487d97Sopenharmony_ci 8ba487d97Sopenharmony_ci http://www.apache.org/licenses/LICENSE-2.0 9ba487d97Sopenharmony_ci 10ba487d97Sopenharmony_ci Unless required by applicable law or agreed to in writing, software 11ba487d97Sopenharmony_ci distributed under the License is distributed on an "AS IS" BASIS, 12ba487d97Sopenharmony_ci WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13ba487d97Sopenharmony_ci See the License for the specific language governing permissions and 14ba487d97Sopenharmony_ci limitations under the License. 15ba487d97Sopenharmony_ci 16ba487d97Sopenharmony_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. 17ba487d97Sopenharmony_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. 18ba487d97Sopenharmony_ci 19ba487d97Sopenharmony_ci licensefile: 20ba487d97Sopenharmony_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. 21ba487d97Sopenharmony_ci 22ba487d97Sopenharmony_ci policylist: 23ba487d97Sopenharmony_ci 1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here. 24ba487d97Sopenharmony_ci 2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is: 25ba487d97Sopenharmony_ci <policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/> 26ba487d97Sopenharmony_ci 3. policyitem type: 27ba487d97Sopenharmony_ci "compatibility" is used to check license compatibility in the specified path; 28ba487d97Sopenharmony_ci "license" is used to check source license header in the specified path; 29ba487d97Sopenharmony_ci "copyright" is used to check source copyright header in the specified path; 30ba487d97Sopenharmony_ci "import" is used to check source dependency in the specified path, such as import ... ,include ... 31ba487d97Sopenharmony_ci "filetype" is used to check file type in the specified path, supported file types: archive, binary 32ba487d97Sopenharmony_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 33ba487d97Sopenharmony_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. 34ba487d97Sopenharmony_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. 35ba487d97Sopenharmony_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. 36ba487d97Sopenharmony_ci 7. policyitem filefilter: Used to bind filefilter which define filter rules. 37ba487d97Sopenharmony_ci 7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code. 38ba487d97Sopenharmony_ci 8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path. 39ba487d97Sopenharmony_ci 40ba487d97Sopenharmony_ci Note:If the text contains special characters, please escape them according to the following rules: 41ba487d97Sopenharmony_ci " == " 42ba487d97Sopenharmony_ci & == & 43ba487d97Sopenharmony_ci ' == ' 44ba487d97Sopenharmony_ci < == < 45ba487d97Sopenharmony_ci > == > 46ba487d97Sopenharmony_ci--> 47ba487d97Sopenharmony_ci 48ba487d97Sopenharmony_ci<configuration> 49ba487d97Sopenharmony_ci <oatconfig> 50ba487d97Sopenharmony_ci <licensefile></licensefile> 51ba487d97Sopenharmony_ci <policylist> 52ba487d97Sopenharmony_ci <policy name="projectPolicy" desc=""> 53ba487d97Sopenharmony_ci <!--policyitem type="compatibility" name="GPL-2.0+" path=".*" desc="Process that runs independently, invoked by the X process."/--> 54ba487d97Sopenharmony_ci <policyitem type="license" name="LGPL" path=".*" desc="Dynamically linked by module X"/> 55ba487d97Sopenharmony_ci <!--policyitem type="copyright" name="xxx" path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Developed by X Company"/--> 56ba487d97Sopenharmony_ci </policy> 57ba487d97Sopenharmony_ci </policylist> 58ba487d97Sopenharmony_ci 59ba487d97Sopenharmony_ci <filefilterlist> 60ba487d97Sopenharmony_ci <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies"> 61ba487d97Sopenharmony_ci <filteritem type="filepath" name="src/main/java/ohos/oat/analysis/headermatcher/.*" 62ba487d97Sopenharmony_ci desc="License matcher rules, not license header"/> 63ba487d97Sopenharmony_ci </filefilter> 64ba487d97Sopenharmony_ci <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies"> 65ba487d97Sopenharmony_ci </filefilter> 66ba487d97Sopenharmony_ci <filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies"> 67ba487d97Sopenharmony_ci </filefilter> 68ba487d97Sopenharmony_ci <filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies"> 69ba487d97Sopenharmony_ci </filefilter> 70ba487d97Sopenharmony_ci <filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies"> 71ba487d97Sopenharmony_ci </filefilter> 72ba487d97Sopenharmony_ci <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies"> 73ba487d97Sopenharmony_ci <filteritem type="filepath" name="figures/媒体子系统架构(蓝色虚线框是media_utils).png" desc="self developed image"/> 74ba487d97Sopenharmony_ci <filteritem type="filepath" name="figures/position-of-this-repository-(in-the-dotted-blue-box)-in-the-multimedia-subsystem.png" desc="self developed image"/> 75ba487d97Sopenharmony_ci </filefilter> 76ba487d97Sopenharmony_ci </filefilterlist> 77ba487d97Sopenharmony_ci </oatconfig> 78ba487d97Sopenharmony_ci</configuration>