1159b3361Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
2159b3361Sopenharmony_ci<!-- Copyright (c) 2024 Huawei Device Co., Ltd.
3159b3361Sopenharmony_ci
4159b3361Sopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
5159b3361Sopenharmony_ci     you may not use this file except in compliance with the License.
6159b3361Sopenharmony_ci     You may obtain a copy of the License at
7159b3361Sopenharmony_ci
8159b3361Sopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
9159b3361Sopenharmony_ci
10159b3361Sopenharmony_ci     Unless required by applicable law or agreed to in writing, software
11159b3361Sopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
12159b3361Sopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13159b3361Sopenharmony_ci     See the License for the specific language governing permissions and
14159b3361Sopenharmony_ci     limitations under the License.
15159b3361Sopenharmony_ci
16159b3361Sopenharmony_ci     Notes:
17159b3361Sopenharmony_ci     This is project config file for OpenHarmony OSS Audit Tool, if you have any questions or concerns, please email chenyaxun@huawei.com.
18159b3361Sopenharmony_ci-->
19159b3361Sopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide:
20159b3361Sopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location.
21159b3361Sopenharmony_cilicensefile:
22159b3361Sopenharmony_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.
23159b3361Sopenharmony_ci
24159b3361Sopenharmony_citasklist(only for batch mode):
25159b3361Sopenharmony_ci1. task: Define oat check thread, each task will start a new thread.
26159b3361Sopenharmony_ci2. task name: Only an name, no practical effect.
27159b3361Sopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
28159b3361Sopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
29159b3361Sopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project.
30159b3361Sopenharmony_ci
31159b3361Sopenharmony_ci
32159b3361Sopenharmony_cipolicyList:
33159b3361Sopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
34159b3361Sopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
35159b3361Sopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
36159b3361Sopenharmony_ci3. policyitem type:
37159b3361Sopenharmony_ci    "compatibility" is used to check license compatibility in the specified path;
38159b3361Sopenharmony_ci    "license" is used to check source license header in the specified path;
39159b3361Sopenharmony_ci    "copyright" is used to check source copyright header in the specified path;
40159b3361Sopenharmony_ci    "import" is used to check source dependency in the specified path, such as import ... ,include ...
41159b3361Sopenharmony_ci    "filetype" is used to check file type in the specified path, supported file types: archive, binary
42159b3361Sopenharmony_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
43159b3361Sopenharmony_ci
44159b3361Sopenharmony_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. 
45159b3361Sopenharmony_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.
46159b3361Sopenharmony_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.
47159b3361Sopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules.
48159b3361Sopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
49159b3361Sopenharmony_ci
50159b3361Sopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules:
51159b3361Sopenharmony_ci    " == &quot;
52159b3361Sopenharmony_ci    & == &amp;
53159b3361Sopenharmony_ci    ' == &apos;
54159b3361Sopenharmony_ci    < == &lt;
55159b3361Sopenharmony_ci    > == &gt;
56159b3361Sopenharmony_ci-->
57159b3361Sopenharmony_ci
58159b3361Sopenharmony_ci<configuration>
59159b3361Sopenharmony_ci    <licensefile>COPYING</licensefile>
60159b3361Sopenharmony_ci    <oatconfig>
61159b3361Sopenharmony_ci         <policylist>
62159b3361Sopenharmony_ci            <policy name="projectPolicy">
63159b3361Sopenharmony_ci                <policyitem type="compatibility" name="LGPL-2.0+" path="libmp3lame/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="reason"/>
64159b3361Sopenharmony_ci                <policyitem type="compatibility" name="GPLStyleLicense" path="libmp3lame/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="reason"/>
65159b3361Sopenharmony_ci                <policyitem type="compatibility" name="LGPLStyleLicense" path="libmp3lame/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="reason"/>
66159b3361Sopenharmony_ci                <policyitem type="compatibility" name="LGPL-2.0+" path="include/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="reason"/>
67159b3361Sopenharmony_ci                <policyitem type="compatibility" name="LGPL-2.0+" path="mpglib/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="reason"/>
68159b3361Sopenharmony_ci            </policy>
69159b3361Sopenharmony_ci        </policylist>
70159b3361Sopenharmony_ci        <filefilterlist>
71159b3361Sopenharmony_ci            <filefilter name="defaultFilter">
72159b3361Sopenharmony_ci                <filteritem type="filepath" name="ACM/.*" desc="ACM codec in Windows OS, not used"/>
73159b3361Sopenharmony_ci                <filteritem type="filepath" name="mac/.*" desc="for MAC OS, not used"/>
74159b3361Sopenharmony_ci                <filteritem type="filepath" name="macosx/.*" desc="for MAC OS, not used"/>
75159b3361Sopenharmony_ci                <filteritem type="filepath" name="Dll/.*" desc="for Windows OS, not used"/>
76159b3361Sopenharmony_ci                <filteritem type="filepath" name="debian/.*" desc="for Debian, not used"/>
77159b3361Sopenharmony_ci                <filteritem type="filepath" name="libmp3lame/i386/.*" desc="for i386, not used"/>
78159b3361Sopenharmony_ci                <filteritem type="filepath" name="vc_solution/.*" desc="vc solution, not used"/>
79159b3361Sopenharmony_ci                <filteritem type="filepath" name="dshow/.*" desc="DirectShow Filter, not used"/>
80159b3361Sopenharmony_ci                <filteritem type="filepath" name="frontend/.*" desc="for lame frontend software, not used"/>
81159b3361Sopenharmony_ci                <filteritem type="filepath" name="test/.*" desc="for test, not used"/>
82159b3361Sopenharmony_ci                <filteritem type="filepath" name="misc/.*" desc="GUI, not used"/>
83159b3361Sopenharmony_ci                <filteritem type="filepath" name="LICENSE" desc="LICENSE file" />
84159b3361Sopenharmony_ci                <filteritem type="filename" name="COPYING" desc="COPYING file" />
85159b3361Sopenharmony_ci                <filteritem type="filename" name="INSTALL.configure" desc="introduction" />
86159b3361Sopenharmony_ci                <filteritem type="filename" name="USAGE" desc="USAGE file, not used" />
87159b3361Sopenharmony_ci                <filteritem type="filename" name="Makefile.*" desc="Makefile, not uesd" />
88159b3361Sopenharmony_ci                <filteritem type="filename" name="missing" desc="Common wrapper for a few potentially missing GNU programs, not used" />
89159b3361Sopenharmony_ci                <filteritem type="filename" name="config*.*" desc="config files, not used" />
90159b3361Sopenharmony_ci                <filteritem type="filename" name="configure" desc="config files, not used" />
91159b3361Sopenharmony_ci                <filteritem type="filename" name="compile" desc="Wrapper for compilers which do not understand '-c -o', not used" />
92159b3361Sopenharmony_ci                <filteritem type="filename" name="depcomp" desc="compile file, not used" />
93159b3361Sopenharmony_ci            </filefilter>
94159b3361Sopenharmony_ci            <filefilter name="binaryFileTypePolicyFilter">
95159b3361Sopenharmony_ci                <filteritem type="filename" name="*.mp3|*.wav" desc="Resource binary." />
96159b3361Sopenharmony_ci                <filteritem type="filename" name="*.png|*.ico|*.gif" desc="Resource and logo binary." />
97159b3361Sopenharmony_ci            </filefilter>
98159b3361Sopenharmony_ci        </filefilterlist>
99159b3361Sopenharmony_ci    </oatconfig>
100159b3361Sopenharmony_ci</configuration>