142365ec6Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
242365ec6Sopenharmony_ci<!-- Copyright (c) 2023 Huawei Device Co., Ltd.
342365ec6Sopenharmony_ci
442365ec6Sopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
542365ec6Sopenharmony_ci     you may not use this file except in compliance with the License.
642365ec6Sopenharmony_ci     You may obtain a copy of the License at
742365ec6Sopenharmony_ci
842365ec6Sopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
942365ec6Sopenharmony_ci
1042365ec6Sopenharmony_ci     Unless required by applicable law or agreed to in writing, software
1142365ec6Sopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
1242365ec6Sopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1342365ec6Sopenharmony_ci     See the License for the specific language governing permissions and
1442365ec6Sopenharmony_ci     limitations under the License.
1542365ec6Sopenharmony_ci
1642365ec6Sopenharmony_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.
1742365ec6Sopenharmony_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.
1842365ec6Sopenharmony_ci
1942365ec6Sopenharmony_ci    licensefile:
2042365ec6Sopenharmony_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.
2142365ec6Sopenharmony_ci
2242365ec6Sopenharmony_ci    policylist:
2342365ec6Sopenharmony_ci    1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here.
2442365ec6Sopenharmony_ci    2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
2542365ec6Sopenharmony_ci    <policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
2642365ec6Sopenharmony_ci    3. policyitem type:
2742365ec6Sopenharmony_ci        "compatibility" is used to check license compatibility in the specified path;
2842365ec6Sopenharmony_ci        "license" is used to check source license header in the specified path;
2942365ec6Sopenharmony_ci        "copyright" is used to check source copyright header in the specified path;
3042365ec6Sopenharmony_ci        "import" is used to check source dependency in the specified path, such as import ... ,include ...
3142365ec6Sopenharmony_ci        "filetype" is used to check file type in the specified path, supported file types: archive, binary
3242365ec6Sopenharmony_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
3342365ec6Sopenharmony_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.
3442365ec6Sopenharmony_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.
3542365ec6Sopenharmony_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.
3642365ec6Sopenharmony_ci    7. policyitem filefilter: Used to bind filefilter which define filter rules.
3742365ec6Sopenharmony_ci    7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code.
3842365ec6Sopenharmony_ci    8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
3942365ec6Sopenharmony_ci
4042365ec6Sopenharmony_ci    Note:If the text contains special characters, please escape them according to the following rules:
4142365ec6Sopenharmony_ci    " == &gt;
4242365ec6Sopenharmony_ci    & == &gt;
4342365ec6Sopenharmony_ci    ' == &gt;
4442365ec6Sopenharmony_ci    < == &gt;
4542365ec6Sopenharmony_ci    > == &gt;
4642365ec6Sopenharmony_ci-->
4742365ec6Sopenharmony_ci
4842365ec6Sopenharmony_ci<configuration>
4942365ec6Sopenharmony_ci    <oatconfig>
5042365ec6Sopenharmony_ci        <filefilterlist>
5142365ec6Sopenharmony_ci            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
5242365ec6Sopenharmony_ci                <filteritem type="filepath" name="AppScope/resources/base/media/.*.png" desc="self developed image"/>
5342365ec6Sopenharmony_ci                <filteritem type="filepath" name="AppScope/resources/base/media/.*.svg" desc="self developed image"/>
5442365ec6Sopenharmony_ci
5542365ec6Sopenharmony_ci                <filteritem type="filepath" name="product/phone/src/main/resources/base/media/.*.png" desc="self developed image"/>
5642365ec6Sopenharmony_ci                <filteritem type="filepath" name="product/phone/src/main/resources/base/media/.*.svg" desc="self developed image"/>
5742365ec6Sopenharmony_ci                <filteritem type="filepath" name="product/phone/src/main/ets/res/image/.*.png" desc="self developed image"/>
5842365ec6Sopenharmony_ci                <filteritem type="filepath" name="product/phone/src/main/ets/res/image/.*.svg" desc="self developed image"/>
5942365ec6Sopenharmony_ci                <filteritem type="filepath" name="product/phone/src/ohosTest/resources/base/media/.*.png" desc="self developed image"/>
6042365ec6Sopenharmony_ci                <filteritem type="filepath" name="product/phone/src/ohosTest/resources/base/media/.*.svg" desc="self developed image"/>
6142365ec6Sopenharmony_ci
6242365ec6Sopenharmony_ci                <filteritem type="filepath" name="product/tablet/src/main/resources/base/media/.*.png" desc="self developed image"/>
6342365ec6Sopenharmony_ci                <filteritem type="filepath" name="product/tablet/src/main/resources/base/media/.*.svg" desc="self developed image"/>
6442365ec6Sopenharmony_ci                <filteritem type="filepath" name="product/tablet/src/main/ets/res/image/.*.png" desc="self developed image"/>
6542365ec6Sopenharmony_ci                <filteritem type="filepath" name="product/tablet/src/main/ets/res/image/.*.svg" desc="self developed image"/>
6642365ec6Sopenharmony_ci                <filteritem type="filepath" name="product/tablet/src/ohosTest/resources/base/media/.*.png" desc="self developed image"/>
6742365ec6Sopenharmony_ci                <filteritem type="filepath" name="product/tablet/src/ohosTest/resources/base/media/.*.svg" desc="self developed image"/>
6842365ec6Sopenharmony_ci
6942365ec6Sopenharmony_ci                <filteritem type="filepath" name="common/src/main/resources/base/media/.*.png" desc="self developed image"/>
7042365ec6Sopenharmony_ci                <filteritem type="filepath" name="common/src/main/resources/base/media/.*.svg" desc="self developed image"/>
7142365ec6Sopenharmony_ci
7242365ec6Sopenharmony_ci                <filteritem type="filepath" name="features/featurecommon/src/main/resources/base/media/.*.png" desc="self developed image"/>
7342365ec6Sopenharmony_ci                <filteritem type="filepath" name="features/featurecommon/src/main/resources/base/media/.*.svg" desc="self developed image"/>
7442365ec6Sopenharmony_ci
7542365ec6Sopenharmony_ci                <filteritem type="filepath" name="features/photo/src/main/resources/base/media/.*.png" desc="self developed image"/>
7642365ec6Sopenharmony_ci                <filteritem type="filepath" name="features/photo/src/main/resources/base/media/.*.svg" desc="self developed image"/>
7742365ec6Sopenharmony_ci
7842365ec6Sopenharmony_ci                <filteritem type="filepath" name="features/video/src/main/resources/base/media/.*.png" desc="self developed image"/>
7942365ec6Sopenharmony_ci                <filteritem type="filepath" name="features/video/src/main/resources/base/media/.*.svg" desc="self developed image"/>
8042365ec6Sopenharmony_ci
8142365ec6Sopenharmony_ci                <filteritem type="filepath" name="features/multi/src/main/resources/base/media/.*.png" desc="self developed image"/>
8242365ec6Sopenharmony_ci                <filteritem type="filepath" name="features/multi/src/main/resources/base/media/.*.svg" desc="self developed image"/>
8342365ec6Sopenharmony_ci
8442365ec6Sopenharmony_ci                <filteritem type="filepath" name="figures/.*.png" desc="self developed image"/>
8542365ec6Sopenharmony_ci            </filefilter>
8642365ec6Sopenharmony_ci
8742365ec6Sopenharmony_ci            <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
8842365ec6Sopenharmony_ci                <filteritem type="filename" name="README|README_zh|.*.log|.*.json5|.*.json" desc=""/>
8942365ec6Sopenharmony_ci                <filteritem type="filename" name="hvigor/hvigor-wrapper.js|hvigor-wrapper.js|hvigorw|hvigorw.bat" desc=""/>
9042365ec6Sopenharmony_ci                <filteritem type="filename" name="hvigor/hvigor-wrapper.js" desc="Build Files"/>
9142365ec6Sopenharmony_ci                <filteritem type="filename" name="hvigorw" desc="Build Files"/>
9242365ec6Sopenharmony_ci                <filteritem type="filename" name="hvigorw.bat" desc="Build Files"/>
9342365ec6Sopenharmony_ci            </filefilter>
9442365ec6Sopenharmony_ci
9542365ec6Sopenharmony_ci            <filefilter name="defaultPolicyFilter" desc="Filters for LICENSE file policies">
9642365ec6Sopenharmony_ci                <filteritem type="filename" name="README|README_zh|*.log|*.json5|*.json" desc="json file"/>
9742365ec6Sopenharmony_ci                <filteritem type="filename" name="hvigor/hvigor-wrapper.js|hvigor-wrapper.js|hvigorw|hvigorw.bat" desc=""/>
9842365ec6Sopenharmony_ci                <filteritem type="filename" name="hvigor/hvigor-wrapper.js" desc="Build Files"/>
9942365ec6Sopenharmony_ci                <filteritem type="filename" name="hvigorw" desc="Build Files"/>
10042365ec6Sopenharmony_ci                <filteritem type="filename" name="hvigorw.bat" desc="Build Files"/>
10142365ec6Sopenharmony_ci            </filefilter>
10242365ec6Sopenharmony_ci        </filefilterlist>
10342365ec6Sopenharmony_ci    </oatconfig>
10442365ec6Sopenharmony_ci</configuration>
105