• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Copyright (c) 2021-2023 Huawei Device Co., Ltd.
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15
16     Notes:
17     This is project config file for OpenHarmony OSS Audit Tool, if you have any questions or concerns, please email chenyaxun.
18-->
19<!-- OAT(OSS Audit Tool) configuration guide:
20basedir: Root dir, the basedir + project path is the real source file location.
21licensefile:
221.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.
23
24tasklist(only for batch mode):
251. task: Define oat check thread, each task will start a new thread.
262. task name: Only an name, no practical effect.
273. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
284. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
295. task project: Projects to be checked, the path field define the source root dir of the project.
30
31
32policyList:
331. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
342. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
35<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
363. policyitem type:
37    "compatibility" is used to check license compatibility in the specified path;
38    "license" is used to check source license header in the specified path;
39    "copyright" is used to check source copyright header in the specified path;
40    "import" is used to check source dependency in the specified path, such as import ... ,include ...
41    "filetype" is used to check file type in the specified path, supported file types: archive, binary
42    "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
43
444. 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.
455. 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.
466. 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.
477. policyitem filefilter: Used to bind filefilter which define filter rules.
488. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
49
50Note:If the text contains special characters, please escape them according to the following rules:
51" == &gt;
52& == &gt;
53' == &gt;
54< == &gt;
55> == &gt;
56-->
57<configuration>
58    <oatconfig>
59        <licensefile>meson.build</licensefile>
60        <policylist>
61            <policy name="projectPolicy" desc="">
62                <policyitem type="license" name="Apache" path="BUILD.gn" rule="may" desc="Apache License"/>
63                <policyitem type="license" name="MIT" path=".*" rule="may" desc="MIT License"/>
64                <policyitem type="copyright" name="Advanced Micro Devices, Inc." path=".*" rule="may" desc=""/>
65                <policyitem type="copyright" name="Broadcom" path=".*" rule="may" desc=""/>
66                <policyitem type="copyright" name="Collabora Ltd." path=".*" rule="may" desc=""/>
67                <policyitem type="copyright" name="Dave Airlie" path=".*" rule="may" desc=""/>
68                <policyitem type="copyright" name="Eric Anholt" path=".*" rule="may" desc=""/>
69                <policyitem type="copyright" name="Felix Kuehling" path=".*" rule="may" desc=""/>
70                <policyitem type="copyright" name="Frank C. Earl" path=".*" rule="may" desc=""/>
71                <policyitem type="copyright" name="Gareth Hughes" path=".*" rule="may" desc=""/>
72                <policyitem type="copyright" name="Google, Inc" path=".*" rule="may" desc=""/>
73                <policyitem type="copyright" name="Huawei Device Co., Ltd." path=".*" rule="may" desc=""/>
74                <policyitem type="copyright" name="Intel Corporation" path=".*" rule="may" desc=""/>
75                <policyitem type="copyright" name="Jakob Bornecrantz" path=".*" rule="may" desc=""/>
76                <policyitem type="copyright" name="Leif Delgass" path=".*" rule="may" desc=""/>
77                <policyitem type="copyright" name="NVIDIA Corporation" path=".*" rule="may" desc=""/>
78                <policyitem type="copyright" name="Precision Insight, Inc." path=".*" rule="may" desc=""/>
79                <policyitem type="copyright" name="Red Hat" path=".*" rule="may" desc=""/>
80                <policyitem type="copyright" name="Stephane Marchesin." path=".*" rule="may" desc=""/>
81                <policyitem type="copyright" name="S3 Graphics, Inc." path=".*" rule="may" desc=""/>
82                <policyitem type="copyright" name="Tungsten Graphics, Inc." path=".*" rule="may" desc=""/>
83                <policyitem type="copyright" name="VA Linux Systems, Inc." path=".*" rule="may" desc=""/>
84                <policyitem type="copyright" name="VIA Technologies, Inc." path=".*" rule="may" desc=""/>
85                <policyitem type="copyright" name="VMware, Inc." path=".*" rule="may" desc=""/>
86            </policy>
87        </policylist>
88        <filefilterlist>
89            <filefilter name="defaultFilter" desc="Files not to check">
90                <filteritem type="filepath" name="amdgpu/.*" desc="not used in ohos"/>
91                <filteritem type="filepath" name="android/.*" desc="not used in ohos"/>
92                <filteritem type="filepath" name="data/.*" desc="not used in ohos"/>
93                <filteritem type="filepath" name="etnaviv/.*" desc="not used in ohos"/>
94                <filteritem type="filepath" name="exynos/.*" desc="not used in ohos"/>
95                <filteritem type="filepath" name="freedreno/.*" desc="not used in ohos"/>
96                <filteritem type="filepath" name="intel/.*" desc="not used in ohos"/>
97                <filteritem type="filepath" name="man/.*" desc="not used in ohos"/>
98                <filteritem type="filepath" name="nouveau/.*" desc="not used in ohos"/>
99                <filteritem type="filepath" name="omap/.*" desc="not used in ohos"/>
100                <filteritem type="filepath" name="radeon/.*" desc="not used in ohos"/>
101                <filteritem type="filepath" name="tegra/.*" desc="not used in ohos"/>
102                <filteritem type="filepath" name="tests/.*" desc="not used in ohos"/>
103                <filteritem type="filepath" name="vc4/.*" desc="not used in ohos"/>
104                <filteritem type="filename" name="*.build|*.in|*.mk|*.py|*.rst|*.sources|*.txt" desc="not used in ohos"/>
105                <filteritem type="filename" name="CONTRIBUTING.rst" desc="not used in ohos"/>
106                <filteritem type="filename" name="RELEASING" desc="not used in ohos"/>
107                <filteritem type="filename" name="generated_static_table_fourcc.h" desc="generated by meson, no license"/>
108            </filefilter>
109            <filefilter name="defaultPolicyFilter" desc="Filters for compatibility, license header policies">
110                <filteritem type="filename" name="README.*"/>
111            </filefilter>
112        </filefilterlist>
113        <licensematcherlist>
114            <licensematcher name="MIT" desc="Filters for MIT License" >
115                <licensetext name="
116                    * Permission is hereby granted, free of charge, to any person obtaining a
117                    * copy of this software and associated documentation files (the
118                    * &gt;Software&gt;), to deal in the Software without restriction, including
119                    * without limitation the rights to use, copy, modify, merge, publish,
120                    * distribute, sub license, and/or sell copies of the Software, and to
121                    * permit persons to whom the Software is furnished to do so, subject to
122                    * the following conditions:
123                    *
124                    * THE SOFTWARE IS PROVIDED &gt;AS IS&gt;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
125                    * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
126                    * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
127                    * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
128                    * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
129                    * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
130                    * USE OR OTHER DEALINGS IN THE SOFTWARE.
131                    *
132                    * The above copyright notice and this permission notice (including the
133                    * next paragraph) shall be included in all copies or substantial portions
134                    * of the Software."/>
135            </licensematcher>
136        </licensematcherlist>
137    </oatconfig>
138</configuration>
139