1a00ade16Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
2a00ade16Sopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
3a00ade16Sopenharmony_ci
4a00ade16Sopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
5a00ade16Sopenharmony_ci     you may not use this file except in compliance with the License.
6a00ade16Sopenharmony_ci     You may obtain a copy of the License at
7a00ade16Sopenharmony_ci
8a00ade16Sopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
9a00ade16Sopenharmony_ci
10a00ade16Sopenharmony_ci     Unless required by applicable law or agreed to in writing, software
11a00ade16Sopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
12a00ade16Sopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13a00ade16Sopenharmony_ci     See the License for the specific language governing permissions and
14a00ade16Sopenharmony_ci     limitations under the License.
15a00ade16Sopenharmony_ci
16a00ade16Sopenharmony_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.
17a00ade16Sopenharmony_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.
18a00ade16Sopenharmony_ci
19a00ade16Sopenharmony_ci    licensefile:
20a00ade16Sopenharmony_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.
21a00ade16Sopenharmony_ci
22a00ade16Sopenharmony_ci    policylist:
23a00ade16Sopenharmony_ci    1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here.
24a00ade16Sopenharmony_ci    2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
25a00ade16Sopenharmony_ci    <policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
26a00ade16Sopenharmony_ci    3. policyitem type:
27a00ade16Sopenharmony_ci        "compatibility" is used to check license compatibility in the specified path;
28a00ade16Sopenharmony_ci        "license" is used to check source license header in the specified path;
29a00ade16Sopenharmony_ci        "copyright" is used to check source copyright header in the specified path;
30a00ade16Sopenharmony_ci        "import" is used to check source dependency in the specified path, such as import ... ,include ...
31a00ade16Sopenharmony_ci        "filetype" is used to check file type in the specified path, supported file types: archive, binary
32a00ade16Sopenharmony_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
33a00ade16Sopenharmony_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.
34a00ade16Sopenharmony_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.
35a00ade16Sopenharmony_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.
36a00ade16Sopenharmony_ci    7. policyitem filefilter: Used to bind filefilter which define filter rules.
37a00ade16Sopenharmony_ci    7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code.
38a00ade16Sopenharmony_ci    8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
39a00ade16Sopenharmony_ci
40a00ade16Sopenharmony_ci    Note:If the text contains special characters, please escape them according to the following rules:
41a00ade16Sopenharmony_ci    " == &quot;
42a00ade16Sopenharmony_ci    & == &amp;
43a00ade16Sopenharmony_ci    ' == &apos;
44a00ade16Sopenharmony_ci    < == &lt;
45a00ade16Sopenharmony_ci    > == &gt;
46a00ade16Sopenharmony_ci-->
47a00ade16Sopenharmony_ci
48a00ade16Sopenharmony_ci<configuration>
49a00ade16Sopenharmony_ci    <oatconfig>
50a00ade16Sopenharmony_ci        <licensefile></licensefile>
51a00ade16Sopenharmony_ci        <policylist>
52a00ade16Sopenharmony_ci            <policy name="projectPolicy" desc="">
53a00ade16Sopenharmony_ci                <!--policyitem type="compatibility" name="GPL-2.0+" path=".*" desc="Process that runs independently, invoked by the X process."/-->
54a00ade16Sopenharmony_ci                <policyitem type="license" name="LGPL" path=".*" desc="Dynamically linked by module X"/>
55a00ade16Sopenharmony_ci                <!--policyitem type="copyright" name="xxx" path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Developed by X Company"/-->
56a00ade16Sopenharmony_ci            </policy>
57a00ade16Sopenharmony_ci        </policylist>
58a00ade16Sopenharmony_ci
59a00ade16Sopenharmony_ci        <filefilterlist>
60a00ade16Sopenharmony_ci            <filefilter name="defaultFilter" desc="Files not to check">
61a00ade16Sopenharmony_ci                <filteritem type="filename" name="*.iml|*.json|*.txt" desc="desc files"/>
62a00ade16Sopenharmony_ci                <filteritem type="filepath" name="target/.*" desc="Compile output files"/>
63a00ade16Sopenharmony_ci                <filteritem type="filepath" name="out/.*" desc="Compile output files"/>
64a00ade16Sopenharmony_ci                <filteritem type="filepath" name="log/.*" desc="log files"/>
65a00ade16Sopenharmony_ci                <filteritem type="filepath" name=".idea/.*" desc="IDE temp files"/>
66a00ade16Sopenharmony_ci                <filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/>
67a00ade16Sopenharmony_ci                <filteritem type="filepath" name="src/test/.*" desc="Test files"/>
68a00ade16Sopenharmony_ci            </filefilter>
69a00ade16Sopenharmony_ci            <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
70a00ade16Sopenharmony_ci                <filteritem type="filepath" name="src/main/java/ohos/oat/analysis/headermatcher/.*"
71a00ade16Sopenharmony_ci                        desc="License matcher rules, not license header"/>
72a00ade16Sopenharmony_ci            </filefilter>
73a00ade16Sopenharmony_ci            <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
74a00ade16Sopenharmony_ci            </filefilter>
75a00ade16Sopenharmony_ci            <filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies">
76a00ade16Sopenharmony_ci            </filefilter>
77a00ade16Sopenharmony_ci            <filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies">
78a00ade16Sopenharmony_ci            </filefilter>
79a00ade16Sopenharmony_ci            <filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies">
80a00ade16Sopenharmony_ci            </filefilter>
81a00ade16Sopenharmony_ci            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies" >
82a00ade16Sopenharmony_ci                <filteritem type="filepath" name="figures\en-us_image_0000001081285004.png" desc="icon"/>
83a00ade16Sopenharmony_ci                <filteritem type="filepath" name="figures\en-us_image_0000001128146921.png" desc="icon"/>
84a00ade16Sopenharmony_ci                <filteritem type="filepath" name="figures\zh-cn_image_0000001081285004.png" desc="icon"/>
85a00ade16Sopenharmony_ci                <filteritem type="filepath" name="figures\zh-cn_image_0000001128146921.png" desc="icon"/>
86a00ade16Sopenharmony_ci            </filefilter>
87a00ade16Sopenharmony_ci        </filefilterlist>
88a00ade16Sopenharmony_ci    </oatconfig>
89a00ade16Sopenharmony_ci</configuration>