12c593315Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
22c593315Sopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
32c593315Sopenharmony_ci
42c593315Sopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
52c593315Sopenharmony_ci     you may not use this file except in compliance with the License.
62c593315Sopenharmony_ci     You may obtain a copy of the License at
72c593315Sopenharmony_ci
82c593315Sopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
92c593315Sopenharmony_ci
102c593315Sopenharmony_ci     Unless required by applicable law or agreed to in writing, software
112c593315Sopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
122c593315Sopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
132c593315Sopenharmony_ci     See the License for the specific language governing permissions and
142c593315Sopenharmony_ci     limitations under the License.
152c593315Sopenharmony_ci
162c593315Sopenharmony_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.
172c593315Sopenharmony_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.
182c593315Sopenharmony_ci
192c593315Sopenharmony_ci    licensefile:
202c593315Sopenharmony_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.
212c593315Sopenharmony_ci
222c593315Sopenharmony_ci    policylist:
232c593315Sopenharmony_ci    1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here.
242c593315Sopenharmony_ci    2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
252c593315Sopenharmony_ci    <policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
262c593315Sopenharmony_ci    3. policyitem type:
272c593315Sopenharmony_ci        "compatibility" is used to check license compatibility in the specified path;
282c593315Sopenharmony_ci        "license" is used to check source license header in the specified path;
292c593315Sopenharmony_ci        "copyright" is used to check source copyright header in the specified path;
302c593315Sopenharmony_ci        "import" is used to check source dependency in the specified path, such as import ... ,include ...
312c593315Sopenharmony_ci        "filetype" is used to check file type in the specified path, supported file types: archive, binary
322c593315Sopenharmony_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
332c593315Sopenharmony_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.
342c593315Sopenharmony_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.
352c593315Sopenharmony_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.
362c593315Sopenharmony_ci    7. policyitem filefilter: Used to bind filefilter which define filter rules.
372c593315Sopenharmony_ci    7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code.
382c593315Sopenharmony_ci    8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
392c593315Sopenharmony_ci
402c593315Sopenharmony_ci    Note:If the text contains special characters, please escape them according to the following rules:
412c593315Sopenharmony_ci    " == &gt;
422c593315Sopenharmony_ci    & == &gt;
432c593315Sopenharmony_ci    ' == &gt;
442c593315Sopenharmony_ci    < == &gt;
452c593315Sopenharmony_ci    > == &gt;
462c593315Sopenharmony_ci-->
472c593315Sopenharmony_ci
482c593315Sopenharmony_ci<configuration>
492c593315Sopenharmony_ci    <oatconfig>
502c593315Sopenharmony_ci        <filefilterlist>
512c593315Sopenharmony_ci            <filefilter name="defaultFilter" desc="Files not to check">
522c593315Sopenharmony_ci                <filteritem type="filepath" name="fuzz/corpus/h2spec/*" desc="These are binary files for fuzz test."/>
532c593315Sopenharmony_ci                <filteritem type="filepath" name="fuzz/corpus/nghttp/*" desc="These are binary files for fuzz test."/>
542c593315Sopenharmony_ci                <filteritem type="filepath" name="doc/_themes/*" desc="These are document themes."/>
552c593315Sopenharmony_ci                <filteritem type="filename" name="*.pem" desc="These ca files for ssl certification test."/>
562c593315Sopenharmony_ci                <filteritem type="filepath" name="lib/Makefile.msvc" desc="Ignore this file, we do not use it."/>
572c593315Sopenharmony_ci                <filteritem type="filepath" name="CONTRIBUTION" desc="Ignore this file, we do not use it."/>
582c593315Sopenharmony_ci                <filteritem type="filepath" name="doc/sources/contribute.rst" desc="Ignore this file, we do not use it."/>
592c593315Sopenharmony_ci                <filteritem type="filepath" name="git-clang-format" desc="Ignore this file, we do not use it."/>
602c593315Sopenharmony_ci                <filteritem type="filepath" name="doc/_exts/sphinxcontrib/rubydomain.py" desc="Ignore this file, we do not use it."/>
612c593315Sopenharmony_ci                <filteritem type="filepath" name="configure.ac" desc="Ignore this file, we do not use it."/>
622c593315Sopenharmony_ci				<filteritem type="filename" name="*.m4" desc="Ignore this file, we do not use it."/>
632c593315Sopenharmony_ci            </filefilter>
642c593315Sopenharmony_ci        </filefilterlist>
652c593315Sopenharmony_ci        <licensematcherlist>
662c593315Sopenharmony_ci            <licensematcher name="BSD License" desc="如果工具扫描是InvalidLicense,可在此定义匹配规则,注意引号要转义" >
672c593315Sopenharmony_ci            <licensetext name=":license: BSD, see LICENSE for details." desc="BSD License"/>
682c593315Sopenharmony_ci            </licensematcher>
692c593315Sopenharmony_ci        </licensematcherlist>
702c593315Sopenharmony_ci    </oatconfig>
712c593315Sopenharmony_ci</configuration>
72