10704ebd2Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 20704ebd2Sopenharmony_ci<!-- Copyright (c) 2022 Huawei Device Co., Ltd. 30704ebd2Sopenharmony_ci 40704ebd2Sopenharmony_ci Licensed under the Apache License, Version 2.0 (the "License"); 50704ebd2Sopenharmony_ci you may not use this file except in compliance with the License. 60704ebd2Sopenharmony_ci You may obtain a copy of the License at 70704ebd2Sopenharmony_ci 80704ebd2Sopenharmony_ci http://www.apache.org/licenses/LICENSE-2.0 90704ebd2Sopenharmony_ci 100704ebd2Sopenharmony_ci Unless required by applicable law or agreed to in writing, software 110704ebd2Sopenharmony_ci distributed under the License is distributed on an "AS IS" BASIS, 120704ebd2Sopenharmony_ci WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 130704ebd2Sopenharmony_ci See the License for the specific language governing permissions and 140704ebd2Sopenharmony_ci limitations under the License. 150704ebd2Sopenharmony_ci--> 160704ebd2Sopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide: 170704ebd2Sopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location. 180704ebd2Sopenharmony_cilicensefile: 190704ebd2Sopenharmony_ci1.If the project does not have "LICENSE" in root dir, please define all the license files in this project. OAT will check license files according to this rule. 200704ebd2Sopenharmony_ci 210704ebd2Sopenharmony_citasklist(only for batch mode): 220704ebd2Sopenharmony_ci1. task: Define oat check thread. Each task will start a new thread. 230704ebd2Sopenharmony_ci2. task name: Only an name, no practical effect. 240704ebd2Sopenharmony_ci3. task policy: Default policy for projects under this task. This field is required and the specified policy must be defined in policylist. 250704ebd2Sopenharmony_ci4. task filter: Default filefilter for projects under this task. This field is required and the specified filefilter must be defined in filefilterlist. 260704ebd2Sopenharmony_ci5. task project: Projects to be checked. The path field defines the source root dir of the project. 270704ebd2Sopenharmony_ci 280704ebd2Sopenharmony_ci 290704ebd2Sopenharmony_cipolicyList: 300704ebd2Sopenharmony_ci1. policy: All policyitems will be merged to default rules in OAT.xml.The name of policy does not affect the OAT check process. 310704ebd2Sopenharmony_ci2. policyitem: The type, name, path, and desc fields are required, and the rule, group, and filefilter fields are optional.The default value is: 320704ebd2Sopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/> 330704ebd2Sopenharmony_ci3. policyitem type: 340704ebd2Sopenharmony_ci "compatibility" is used to check license compatibility in the specified path; 350704ebd2Sopenharmony_ci "license" is used to check source license header in the specified path; 360704ebd2Sopenharmony_ci "copyright" is used to check source copyright header in the specified path; 370704ebd2Sopenharmony_ci "import" is used to check source dependency in the specified path, such as import ... ,include ... 380704ebd2Sopenharmony_ci "filetype" is used to check file type in the specified path, supported file types: archive, binary 390704ebd2Sopenharmony_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 400704ebd2Sopenharmony_ci 410704ebd2Sopenharmony_ci4. policyitem name: This field is used to define the license, copyright. Wherein,"*" means matching of all, the "!" prefix means a failure to match this value. For example, "!GPL" means that the GPL license cannot be used. 420704ebd2Sopenharmony_ci5. policyitem path: This field is used to define the source file scope to apply this policyitem. Wherein,"!" prefix means to exclude the files. For example, "!.*/lib/.*" means files in lib dir will be exclude while process this policyitem. 430704ebd2Sopenharmony_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. 440704ebd2Sopenharmony_ci7. policyitem filefilter: This field is used to bind filefilter,which defines filter rules. 450704ebd2Sopenharmony_ci8. filefilter: Filter rules.The type filename is used to filter file names, and the type filepath is used to filter file paths. 460704ebd2Sopenharmony_ci 470704ebd2Sopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules: 480704ebd2Sopenharmony_ci" == > 490704ebd2Sopenharmony_ci& == > 500704ebd2Sopenharmony_ci' == > 510704ebd2Sopenharmony_ci< == > 520704ebd2Sopenharmony_ci> == > 530704ebd2Sopenharmony_ci--> 540704ebd2Sopenharmony_ci<configuration> 550704ebd2Sopenharmony_ci <oatconfig> 560704ebd2Sopenharmony_ci <filefilterlist> 570704ebd2Sopenharmony_ci <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binaryFile" > 580704ebd2Sopenharmony_ci <filteritem type="filename" name="*.jpg" desc="all jpg file have check "/> 590704ebd2Sopenharmony_ci <filteritem type="filename" name="*.gif" desc="all gif file have check "/> 600704ebd2Sopenharmony_ci <filteritem type="filename" name="*.png" desc="all png file have check "/> 610704ebd2Sopenharmony_ci </filefilter> 620704ebd2Sopenharmony_ci </filefilterlist> 630704ebd2Sopenharmony_ci </oatconfig> 640704ebd2Sopenharmony_ci</configuration> 65