• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Copyright (c) 2022 Huawei Device Co., Ltd.
3     Licensed under the Apache License, Version 2.0 (the "License");
4     you may not use this file except in compliance with the License.
5     You may obtain a copy of the License at
6
7          http://www.apache.org/licenses/LICENSE-2.0
8
9     Unless required by applicable law or agreed to in writing, software
10     distributed under the License is distributed on an "AS IS" BASIS,
11     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12     See the License for the specific language governing permissions and
13     limitations under the License.
14-->
15<!-- OAT(OSS Audit Tool) configuration guide:
16basedir: Root dir, the basedir + project path is the real source file location.
17licensefile:
181.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.
19
20tasklist(only for batch mode):
211. task: Define oat check thread, each task will start a new thread.
222. task name: Only an name, no practical effect.
233. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
244. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
255. task project: Projects to be checked, the path field define the source root dir of the project.
26
27
28policyList:
291. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
302. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
31<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
323. policyitem type:
33    "compatibility" is used to check license compatibility in the specified path;
34    "license" is used to check source license header in the specified path;
35    "copyright" is used to check source copyright header in the specified path;
36    "import" is used to check source dependency in the specified path, such as import ... ,include ...
37    "filetype" is used to check file type in the specified path, supported file types: archive, binary
38    "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
39
404. 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.
415. 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.
426. 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.
437. policyitem filefilter: Used to bind filefilter which define filter rules.
448. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
45
46Note:If the text contains special characters, please escape them according to the following rules:
47" == &gt;
48& == &gt;
49' == &gt;
50< == &gt;
51> == &gt;
52-->
53<configuration>
54    <oatconfig>
55        <licensefile>xml/README.adoc</licensefile>
56         <policylist>
57            <policy name="projectPolicy" desc="">
58                <policyitem type="compatibility" name="SPDC:CC-BY-4.0" path="CODE_OF_CONDUCT.adoc" desc="相关几个文件是文档文件"/>
59                <policyitem type="compatibility" name="SPDC:CC-BY-4.0" path="README.adoc" desc="相关几个文件是文档文件"/>
60                <policyitem type="compatibility" name="SPDX:CC-BY-4.0" path="README.adoc" desc="相关几个文件是文档文件"/>
61            </policy>
62        </policylist>
63        <filefilterlist>
64            <filefilter name="defaultPolicyFilter" desc="Filters for compatibility, not to check">
65                <filteritem type="filename" name="README.OpenSource" desc=""/>
66                <filteritem type="filename" name="README" desc=""/>
67                <filteritem type="filepath" name="specs/*"  desc=""/>
68                <filteritem type="filepath" name="api/*"  desc=""/>
69                <filteritem type="filepath" name="ABI/*"  desc=""/>
70                <filteritem type="filename" name="README.adoc" desc="README "/>
71                <filteritem type="filename" name="gl.h" desc="SGI-B-1.0 License "/>
72                <filteritem type="filepath" name="CODE_OF_CONDUCT.adoc" desc="doc"/>
73            </filefilter>
74            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
75                <filteritem type="filename" name="*.eot|*.ttf|*.woff*|*.pdf" desc="原生二进制"/>
76                <filteritem type="filepath" name="ABI/new.gif" desc="原生二进制"/>
77                <filteritem type="filepath" name="extensions/SGI/cubemap.sho" desc="原生二进制"/>
78                <filteritem type="filepath" name="extensions/SGI/imaging_pipeline.sho" desc="原生二进制"/>
79            </filefilter>
80        </filefilterlist>
81        <licensematcherlist>
82            <licensematcher name="SGI-B-1.0 License" desc="License for SGI-B-1.0" >
83                    <licensetext name="
84                ** License Applicability. Except to the extent portions of this file are
85                ** made subject to an alternative license as permitted in the SGI Free
86                ** Software License B, Version 1.0 (the &gt;License&gt;), the contents of this
87                ** file are subject only to the provisions of the License. You may not use
88                ** this file except in compliance with the License. You may obtain a copy
89                ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
90                ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
91                    " desc=""/>
92                    <licensetext name="
93                * Copyright 1991-2000 Silicon Graphics, Inc. This document is
94                * licensed under the SGI Free Software B License. For details, see
95                * http://oss.sgi.com/projects/FreeB/
96                    " desc=""/>
97                    <licensetext name="
98                * This document is licensed under the SGI Free Software B License Version
99                * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
100                    " desc=""/>
101            </licensematcher>
102        </licensematcherlist>
103    </oatconfig>
104</configuration>
105