19f07849eSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 29f07849eSopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd. 39f07849eSopenharmony_ci 49f07849eSopenharmony_ci Licensed under the Apache License, Version 2.0 (the "License"); 59f07849eSopenharmony_ci you may not use this file except in compliance with the License. 69f07849eSopenharmony_ci You may obtain a copy of the License at 79f07849eSopenharmony_ci 89f07849eSopenharmony_ci http://www.apache.org/licenses/LICENSE-2.0 99f07849eSopenharmony_ci 109f07849eSopenharmony_ci Unless required by applicable law or agreed to in writing, software 119f07849eSopenharmony_ci distributed under the License is distributed on an "AS IS" BASIS, 129f07849eSopenharmony_ci WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 139f07849eSopenharmony_ci See the License for the specific language governing permissions and 149f07849eSopenharmony_ci limitations under the License. 159f07849eSopenharmony_ci 169f07849eSopenharmony_ci Notes: 179f07849eSopenharmony_ci This is project config file for OpenHarmony OSS Audit Tool, if you have any questions or concerns, please email chenyaxun. 189f07849eSopenharmony_ci--> 199f07849eSopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide: 209f07849eSopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location. 219f07849eSopenharmony_cilicensefile: 229f07849eSopenharmony_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. 239f07849eSopenharmony_ci 249f07849eSopenharmony_citasklist(only for batch mode): 259f07849eSopenharmony_ci1. task: Define oat check thread, each task will start a new thread. 269f07849eSopenharmony_ci2. task name: Only an name, no practical effect. 279f07849eSopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist. 289f07849eSopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist. 299f07849eSopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project. 309f07849eSopenharmony_ci 319f07849eSopenharmony_ci 329f07849eSopenharmony_cipolicyList: 339f07849eSopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process. 349f07849eSopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is: 359f07849eSopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/> 369f07849eSopenharmony_ci3. policyitem type: 379f07849eSopenharmony_ci "compatibility" is used to check license compatibility in the specified path; 389f07849eSopenharmony_ci "license" is used to check source license header in the specified path; 399f07849eSopenharmony_ci "copyright" is used to check source copyright header in the specified path; 409f07849eSopenharmony_ci "import" is used to check source dependency in the specified path, such as import ... ,include ... 419f07849eSopenharmony_ci "filetype" is used to check file type in the specified path, supported file types: archive, binary 429f07849eSopenharmony_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 439f07849eSopenharmony_ci 449f07849eSopenharmony_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. 459f07849eSopenharmony_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. 469f07849eSopenharmony_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. 479f07849eSopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules. 489f07849eSopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path. 499f07849eSopenharmony_ci 509f07849eSopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules: 519f07849eSopenharmony_ci" == > 529f07849eSopenharmony_ci& == > 539f07849eSopenharmony_ci' == > 549f07849eSopenharmony_ci< == > 559f07849eSopenharmony_ci> == > 569f07849eSopenharmony_ci--> 579f07849eSopenharmony_ci<configuration> 589f07849eSopenharmony_ci <oatconfig> 599f07849eSopenharmony_ci <licensefile>COPYING</licensefile> 609f07849eSopenharmony_ci <policylist> 619f07849eSopenharmony_ci <policy name="projectPolicy" desc=""> 629f07849eSopenharmony_ci <policyitem type="compatibility" name="MIT" path=".*" desc="独立进程,独立使用"/> 639f07849eSopenharmony_ci <policyitem type="compatibility" name="GPL-2.0+" path=".*" desc="独立进程,独立使用"/> 649f07849eSopenharmony_ci <policyitem type="compatibility" name="LGPLStyleLicense" path=".*" desc="独立进程,独立使用"/> 659f07849eSopenharmony_ci <policyitem type="compatibility" name="InvalidLicense" path=".*" rule="may" group="defaultGroup" filefilter="MIT" desc="独立进程,独立使用"/> 669f07849eSopenharmony_ci <policyitem type="license" name="LGPLStyleLicense" path=".*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc=""/> 679f07849eSopenharmony_ci <policyitem type="license" name="MIT" path=".*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc=""/> 689f07849eSopenharmony_ci <policyitem type="license" name="InvalidLicense" path=".*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc=""/> 699f07849eSopenharmony_ci <policyitem type="license" name="Felipe Castro" path=".*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc=""/> 709f07849eSopenharmony_ci <policyitem type="license" name="GPL-2.0+" path=".*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc=""/> 719f07849eSopenharmony_ci <policyitem type="copyright" name="Free Software Foundation, Inc." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc=""/> 729f07849eSopenharmony_ci <policyitem type="copyright" name="X Consortium" path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc=""/> 739f07849eSopenharmony_ci <policyitem type="copyright" name="Felipe Castro" path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc=""/> 749f07849eSopenharmony_ci <policyitem type="copyright" name="US Interactive, Inc." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc=""/> 759f07849eSopenharmony_ci <policyitem type="copyright" name="Huawei Device Co., Ltd." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc=""/> 769f07849eSopenharmony_ci <policyitem type="copyright" name="Red Hat, Inc." path="tests/test1.c" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc=""/> 779f07849eSopenharmony_ci </policy> 789f07849eSopenharmony_ci </policylist> 799f07849eSopenharmony_ci <licensematcherlist> 809f07849eSopenharmony_ci <licensematcher name="InvalidLicense" desc="MIT License"> 819f07849eSopenharmony_ci <licensetext name=" 829f07849eSopenharmony_ci /* (C) 1998-2002 Red Hat, Inc. -- Licensing details are in the COPYING 839f07849eSopenharmony_ci file accompanying popt source distributions, available from 849f07849eSopenharmony_ci ftp://ftp.rpm.org/pub/rpm/dist. */ 859f07849eSopenharmony_ci " desc=""/> 869f07849eSopenharmony_ci <licensetext name="Licensing details are in the COPYING" desc=""/> 879f07849eSopenharmony_ci <licensetext name=" 889f07849eSopenharmony_ci Free Software Foundation, Inc. 899f07849eSopenharmony_ci dnl " 909f07849eSopenharmony_ci desc=""/> 919f07849eSopenharmony_ci <licensetext name=" 929f07849eSopenharmony_ci This file is free software; the Free Software Foundation. " 939f07849eSopenharmony_ci desc=""/> 949f07849eSopenharmony_ci <licensetext name=" 959f07849eSopenharmony_ci This file can be copied and used freely without restrictions. " 969f07849eSopenharmony_ci desc=""/> 979f07849eSopenharmony_ci </licensematcher> 989f07849eSopenharmony_ci </licensematcherlist> 999f07849eSopenharmony_ci <filefilterlist> 1009f07849eSopenharmony_ci <filefilter name="defaultFilter" desc="Files not to check"> 1019f07849eSopenharmony_ci <filteritem type="filepath" name="tests/test3-data/.* " desc="test file"/> 1029f07849eSopenharmony_ci <filteritem type="filepath" name="po/*.* " desc="License and Copyright Header are null"/> 1039f07849eSopenharmony_ci <filteritem type="filename" name="autogen.sh|Makefile.am|Dockerfile|testit.sh|configure.ac|.popt|libpopt.vers|README.OpenSource|CREDITS" desc="License and Copyright Header are null"/> 1049f07849eSopenharmony_ci <filteritem type="filename" name="test3.c|lookup3.c|poptint.c|system.h|tdict.c" desc="License and Copyright Header are null"/> 1059f07849eSopenharmony_ci </filefilter> 1069f07849eSopenharmony_ci <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies"> 1079f07849eSopenharmony_ci <filteritem type="filename" name="popt.pdf" desc="文本文件,不扫描"/> 1089f07849eSopenharmony_ci </filefilter> 1099f07849eSopenharmony_ci <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies"> 1109f07849eSopenharmony_ci </filefilter> 1119f07849eSopenharmony_ci <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies"> 1129f07849eSopenharmony_ci <filteritem type="filename" name="popt.*|poptconfig.c|popthelp.c|poptint.h|poptparse.c|test1.c" desc="源码没有版本标题,不扫描"/> 1139f07849eSopenharmony_ci </filefilter> 1149f07849eSopenharmony_ci </filefilterlist> 1159f07849eSopenharmony_ci </oatconfig> 1169f07849eSopenharmony_ci</configuration> 117