13af6ab5fSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
23af6ab5fSopenharmony_ci<!-- Copyright (c) 2022 Huawei Device Co., Ltd.
33af6ab5fSopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
43af6ab5fSopenharmony_ci     you may not use this file except in compliance with the License.
53af6ab5fSopenharmony_ci     You may obtain a copy of the License at
63af6ab5fSopenharmony_ci
73af6ab5fSopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
83af6ab5fSopenharmony_ci
93af6ab5fSopenharmony_ci     Unless required by applicable law or agreed to in writing, software
103af6ab5fSopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
113af6ab5fSopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
123af6ab5fSopenharmony_ci     See the License for the specific language governing permissions and
133af6ab5fSopenharmony_ci     limitations under the License.
143af6ab5fSopenharmony_ci-->
153af6ab5fSopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide:
163af6ab5fSopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location.
173af6ab5fSopenharmony_cilicensefile:
183af6ab5fSopenharmony_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.
193af6ab5fSopenharmony_ci
203af6ab5fSopenharmony_citasklist(only for batch mode):
213af6ab5fSopenharmony_ci1. task: Define oat check thread, each task will start a new thread.
223af6ab5fSopenharmony_ci2. task name: Only an name, no practical effect.
233af6ab5fSopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
243af6ab5fSopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
253af6ab5fSopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project.
263af6ab5fSopenharmony_ci
273af6ab5fSopenharmony_ci
283af6ab5fSopenharmony_cipolicyList:
293af6ab5fSopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
303af6ab5fSopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
313af6ab5fSopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
323af6ab5fSopenharmony_ci3. policyitem type:
333af6ab5fSopenharmony_ci    "compatibility" is used to check license compatibility in the specified path;
343af6ab5fSopenharmony_ci    "license" is used to check source license header in the specified path;
353af6ab5fSopenharmony_ci    "copyright" is used to check source copyright header in the specified path;
363af6ab5fSopenharmony_ci    "import" is used to check source dependency in the specified path, such as import ... ,include ...
373af6ab5fSopenharmony_ci    "filetype" is used to check file type in the specified path, supported file types: archive, binary
383af6ab5fSopenharmony_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
393af6ab5fSopenharmony_ci
403af6ab5fSopenharmony_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.
413af6ab5fSopenharmony_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.
423af6ab5fSopenharmony_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.
433af6ab5fSopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules.
443af6ab5fSopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
453af6ab5fSopenharmony_ci
463af6ab5fSopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules:
473af6ab5fSopenharmony_ci" == &gt;
483af6ab5fSopenharmony_ci& == &gt;
493af6ab5fSopenharmony_ci' == &gt;
503af6ab5fSopenharmony_ci< == &gt;
513af6ab5fSopenharmony_ci> == &gt;
523af6ab5fSopenharmony_ci-->
533af6ab5fSopenharmony_ci<configuration>
543af6ab5fSopenharmony_ci    <oatconfig>
553af6ab5fSopenharmony_ci        <policy name="defaultPolicy" desc="" >
563af6ab5fSopenharmony_ci		<policyitem type="compatibility" name="Apache" path="arkcompiler/ets_frontend" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc=""/>
573af6ab5fSopenharmony_ci        <policyitem type="copyright" name="Shenzhen Kaihong Digital Industry Development Co., Ltd." path="es2panda/test/parser/js/test-hashbang-comment-3.js" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc=""/>
583af6ab5fSopenharmony_ci        <policyitem type="copyright" name="Shenzhen Kaihong Digital Industry Development Co., Ltd." path="es2panda/test/parser/js/test-hashbang-comment-2.js" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc=""/>
593af6ab5fSopenharmony_ci        <policyitem type="copyright" name="Shenzhen Kaihong Digital Industry Development Co., Ltd." path="es2panda/test/parser/js/test-hashbang-comment-1.js" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc=""/>
603af6ab5fSopenharmony_ci        </policy>
613af6ab5fSopenharmony_ci        <filefilterlist>
623af6ab5fSopenharmony_ci            <filefilter name="binaryFileTypePolicyFilter" desc="" >
633af6ab5fSopenharmony_ci                    <filteritem type="filepath" name="legacy_bin/api8/bin/linux/js2abc" desc="js2abc for linux"/>
643af6ab5fSopenharmony_ci                    <filteritem type="filepath" name="legacy_bin/api8/bin/mac/js2abc" desc="js2abc for max"/>
653af6ab5fSopenharmony_ci                    <filteritem type="filepath" name="legacy_bin/api8/bin/win/js2abc.exe" desc="js2abc for win"/>
663af6ab5fSopenharmony_ci                    <filteritem type="filepath" name="ets2panda/linter/test/d_ts.lib.d.ts" desc="common ts test file"/>
673af6ab5fSopenharmony_ci                    <filteritem type="filepath" name="figures/en-us_image_ets_frontend_arch.png" desc="picture used in README.md"/>
683af6ab5fSopenharmony_ci                    <filteritem type="filepath" name="figures/zh-cn_image_ets_frontend_arch.png" desc="picture used in README_zh.md"/>
693af6ab5fSopenharmony_ci            </filefilter>
703af6ab5fSopenharmony_ci            <filefilter name="copyrightPolicyFilter" desc="" >
713af6ab5fSopenharmony_ci                <filteritem type="filepath" name="legacy_bin/api8/src/index.js" desc="third-party"/>
723af6ab5fSopenharmony_ci                <filteritem type="filepath" name="es2panda/test/compiler/js/cocos_worker_test.js" desc="third-party"/>
733af6ab5fSopenharmony_ci            </filefilter>
743af6ab5fSopenharmony_ci            <filefilter name="defaultPolicyFilter" desc="" >
753af6ab5fSopenharmony_ci                <filteritem type="filepath" name="legacy_bin/api8/src/index.js" desc="third-party"/>
763af6ab5fSopenharmony_ci                <filteritem type="filepath" name="es2panda/test/compiler/js/cocos_worker_test.js" desc="third-party"/>
773af6ab5fSopenharmony_ci            </filefilter>
783af6ab5fSopenharmony_ci        </filefilterlist>
793af6ab5fSopenharmony_ci    </oatconfig>
803af6ab5fSopenharmony_ci</configuration>
813af6ab5fSopenharmony_ci
82