1ffe3c632Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 2ffe3c632Sopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd. 3ffe3c632Sopenharmony_ci 4ffe3c632Sopenharmony_ci Licensed under the Apache License, Version 2.0 (the "License"); 5ffe3c632Sopenharmony_ci you may not use this file except in compliance with the License. 6ffe3c632Sopenharmony_ci You may obtain a copy of the License at 7ffe3c632Sopenharmony_ci 8ffe3c632Sopenharmony_ci http://www.apache.org/licenses/LICENSE-2.0 9ffe3c632Sopenharmony_ci 10ffe3c632Sopenharmony_ci Unless required by applicable law or agreed to in writing, software 11ffe3c632Sopenharmony_ci distributed under the License is distributed on an "AS IS" BASIS, 12ffe3c632Sopenharmony_ci WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13ffe3c632Sopenharmony_ci See the License for the specific language governing permissions and 14ffe3c632Sopenharmony_ci limitations under the License. 15ffe3c632Sopenharmony_ci--> 16ffe3c632Sopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide: 17ffe3c632Sopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location. 18ffe3c632Sopenharmony_cilicensefile: 19ffe3c632Sopenharmony_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. 20ffe3c632Sopenharmony_ci 21ffe3c632Sopenharmony_citasklist(only for batch mode): 22ffe3c632Sopenharmony_ci1. task: Define oat check thread, each task will start a new thread. 23ffe3c632Sopenharmony_ci2. task name: Only an name, no practical effect. 24ffe3c632Sopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist. 25ffe3c632Sopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist. 26ffe3c632Sopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project. 27ffe3c632Sopenharmony_ci 28ffe3c632Sopenharmony_ci 29ffe3c632Sopenharmony_cipolicyList: 30ffe3c632Sopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process. 31ffe3c632Sopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is: 32ffe3c632Sopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/> 33ffe3c632Sopenharmony_ci3. policyitem type: 34ffe3c632Sopenharmony_ci "compatibility" is used to check license compatibility in the specified path; 35ffe3c632Sopenharmony_ci "license" is used to check source license header in the specified path; 36ffe3c632Sopenharmony_ci "copyright" is used to check source copyright header in the specified path; 37ffe3c632Sopenharmony_ci "import" is used to check source dependency in the specified path, such as import ... ,include ... 38ffe3c632Sopenharmony_ci "filetype" is used to check file type in the specified path, supported file types: archive, binary 39ffe3c632Sopenharmony_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 40ffe3c632Sopenharmony_ci 41ffe3c632Sopenharmony_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. 42ffe3c632Sopenharmony_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. 43ffe3c632Sopenharmony_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. 44ffe3c632Sopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules. 45ffe3c632Sopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path. 46ffe3c632Sopenharmony_ci 47ffe3c632Sopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules: 48ffe3c632Sopenharmony_ci" == > 49ffe3c632Sopenharmony_ci& == > 50ffe3c632Sopenharmony_ci' == > 51ffe3c632Sopenharmony_ci< == > 52ffe3c632Sopenharmony_ci> == > 53ffe3c632Sopenharmony_ci--> 54ffe3c632Sopenharmony_ci<configuration> 55ffe3c632Sopenharmony_ci <oatconfig> 56ffe3c632Sopenharmony_ci <policylist> 57ffe3c632Sopenharmony_ci <policy name="projectPolicy" desc=""> 58ffe3c632Sopenharmony_ci <policyitem type="compatibility" name="MIT|GPLStyleLicense" path="conformance/third_party/jsoncpp/jsoncpp.cpp" desc="Not GPL License, only describe The MIT license is compatible with both the GPL and commercial 59ffe3c632Sopenharmony_cisoftware"/> 60ffe3c632Sopenharmony_ci <policyitem type="compatibility" name="MIT|GPLStyleLicense" path="conformance/third_party/jsoncpp/json.h" desc="Not GPL License, only describe The MIT license is compatible with both the GPL and commercial 61ffe3c632Sopenharmony_cisoftware "/> 62ffe3c632Sopenharmony_ci </policy> 63ffe3c632Sopenharmony_ci </policylist> 64ffe3c632Sopenharmony_ci <filefilterlist> 65ffe3c632Sopenharmony_ci <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies" > 66ffe3c632Sopenharmony_ci <filteritem type="filepath" name=".*" desc="the binary file in third party"/> 67ffe3c632Sopenharmony_ci </filefilter> 68ffe3c632Sopenharmony_ci <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies"> 69ffe3c632Sopenharmony_ci <filteritem type="filename" name="generate_descriptor_proto.sh" desc="no license header"/> 70ffe3c632Sopenharmony_ci <filteritem type="filename" name="autogen.sh" desc="no license header"/> 71ffe3c632Sopenharmony_ci <filteritem type="filepath" name="php/generate_descriptor_protos.sh" desc="no license header"/> 72ffe3c632Sopenharmony_ci <filteritem type="filepath" name="conformance/third_party/jsoncpp/json.h" desc="no license header"/> 73ffe3c632Sopenharmony_ci <filteritem type="filepath" name="conformance/third_party/jsoncpp/jsoncpp.cpp" desc="no license header"/> 74ffe3c632Sopenharmony_ci <filteritem type="filename" name="Makefile.am" desc="no license header"/> 75ffe3c632Sopenharmony_ci <filteritem type="filename" name="post_process_dist.sh" desc="no license header"/> 76ffe3c632Sopenharmony_ci <filteritem type="filepath" name="js/commonjs/export.js" desc="no license header"/> 77ffe3c632Sopenharmony_ci <filteritem type="filepath" name="php/generate_descriptor_protos.sh" desc="no license header"/> 78ffe3c632Sopenharmony_ci <filteritem type="filepath" name="kokoro/release/python/linux/config.sh" desc="no license header"/> 79ffe3c632Sopenharmony_ci <filteritem type="filepath" name="kokoro/docs/publish-python.sh" desc="no license header"/> 80ffe3c632Sopenharmony_ci <filteritem type="filepath" name="objectivec/generate_well_known_types.sh" desc="no license header"/> 81ffe3c632Sopenharmony_ci <filteritem type="filepath" name="configure.ac" desc="no license header"/> 82ffe3c632Sopenharmony_ci </filefilter> 83ffe3c632Sopenharmony_ci </filefilterlist> 84ffe3c632Sopenharmony_ci </oatconfig> 85ffe3c632Sopenharmony_ci</configuration> 86