176fd607bSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
276fd607bSopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
376fd607bSopenharmony_ci
476fd607bSopenharmony_ci     Licensed under the Apache License, Version 2.0 (the "License");
576fd607bSopenharmony_ci     you may not use this file except in compliance with the License.
676fd607bSopenharmony_ci     You may obtain a copy of the License at
776fd607bSopenharmony_ci
876fd607bSopenharmony_ci          http://www.apache.org/licenses/LICENSE-2.0
976fd607bSopenharmony_ci
1076fd607bSopenharmony_ci     Unless required by applicable law or agreed to in writing, software
1176fd607bSopenharmony_ci     distributed under the License is distributed on an "AS IS" BASIS,
1276fd607bSopenharmony_ci     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1376fd607bSopenharmony_ci     See the License for the specific language governing permissions and
1476fd607bSopenharmony_ci     limitations under the License.
1576fd607bSopenharmony_ci
1676fd607bSopenharmony_ci     Notes:
1776fd607bSopenharmony_ci     This is project config file for OpenHarmony OSS Audit Tool, if you have any questions or concerns, please email chenyaxun.
1876fd607bSopenharmony_ci-->
1976fd607bSopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide:
2076fd607bSopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location.
2176fd607bSopenharmony_cilicensefile:
2276fd607bSopenharmony_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.
2376fd607bSopenharmony_ci
2476fd607bSopenharmony_citasklist(only for batch mode):
2576fd607bSopenharmony_ci1. task: Define oat check thread, each task will start a new thread.
2676fd607bSopenharmony_ci2. task name: Only an name, no practical effect.
2776fd607bSopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
2876fd607bSopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
2976fd607bSopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project.
3076fd607bSopenharmony_ci
3176fd607bSopenharmony_ci
3276fd607bSopenharmony_cipolicyList:
3376fd607bSopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
3476fd607bSopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
3576fd607bSopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
3676fd607bSopenharmony_ci3. policyitem type:
3776fd607bSopenharmony_ci    "compatibility" is used to check license compatibility in the specified path;
3876fd607bSopenharmony_ci    "license" is used to check source license header in the specified path;
3976fd607bSopenharmony_ci    "copyright" is used to check source copyright header in the specified path;
4076fd607bSopenharmony_ci    "import" is used to check source dependency in the specified path, such as import ... ,include ...
4176fd607bSopenharmony_ci    "filetype" is used to check file type in the specified path, supported file types: archive, binary
4276fd607bSopenharmony_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
4376fd607bSopenharmony_ci
4476fd607bSopenharmony_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.
4576fd607bSopenharmony_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.
4676fd607bSopenharmony_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.
4776fd607bSopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules.
4876fd607bSopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
4976fd607bSopenharmony_ci
5076fd607bSopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules:
5176fd607bSopenharmony_ci" == &gt;
5276fd607bSopenharmony_ci& == &gt;
5376fd607bSopenharmony_ci' == &gt;
5476fd607bSopenharmony_ci< == &gt;
5576fd607bSopenharmony_ci> == &gt;
5676fd607bSopenharmony_ci-->
5776fd607bSopenharmony_ci<configuration>
5876fd607bSopenharmony_ci    <oatconfig>
5976fd607bSopenharmony_ci        <policylist>
6076fd607bSopenharmony_ci            <policy name="projectPolicy" desc="">
6176fd607bSopenharmony_ci                <policyitem type="copyright" name="Huawei Device Co., Ltd." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc=""/>
6276fd607bSopenharmony_ci            </policy>
6376fd607bSopenharmony_ci        </policylist>
6476fd607bSopenharmony_ci        <filefilterlist>
6576fd607bSopenharmony_ci            <filefilter name="FileTypePolicyFilter" desc="Filters for file policies" >
6676fd607bSopenharmony_ci                <filteritem type="filepath" name=".*" desc="Media library files "/>
6776fd607bSopenharmony_ci            </filefilter>
6876fd607bSopenharmony_ci	    <filefilter name="defaultPolicyFilter" desc="Files not to check">
6976fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/build-profile.json5" desc="Media library files "/>
7076fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/hvigorfile.js" desc="Media library files "/>
7176fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/ohosTest/module.json5" desc="Media library files "/>
7276fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/ohosTest/ets/TestAbility/pages/index.ets" desc="Media library files "/>
7376fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/build-profile.json5" desc="Media library files "/>
7476fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/hvigorfile.js" desc="Media library files "/>
7576fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/main/ets/pages/index.ets" desc="Media library files "/>
7676fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/ohosTest/ets/test/Ability.test.ets" desc="Media library files "/>
7776fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/ohosTest/ets/test/List.test.ets" desc="Media library files "/>
7876fd607bSopenharmony_ci        <filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/main/ets/Application/AbilityStage.ts" desc="Media library files "/>
7976fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/ohosTest/ets/TestRunner/OpenHarmonyTestRunner.ts" desc="Media library files "/>
8076fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/main/ets/MainAbility/MainAbility.ts" desc="Media library files "/>
8176fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/main/ets/DataShareExtAbility/DataShareExtAbility.ts" desc="Media library files "/>
8276fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/ohosTest/ets/TestAbility/TestAbility.ts" desc="Media library files "/>
8376fd607bSopenharmony_ci            </filefilter>
8476fd607bSopenharmony_ci	    <filefilter name="copyrightPolicyFilter" desc="Files not to check">
8576fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/build-profile.json5" desc="Media library files "/>
8676fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/hvigorfile.js" desc="Media library files "/>
8776fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/ohosTest/module.json5" desc="Media library files "/>
8876fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/ohosTest/ets/TestAbility/pages/index.ets" desc="Media library files "/>
8976fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/build-profile.json5" desc="Media library files "/>
9076fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/hvigorfile.js" desc="Media library files "/>
9176fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/main/ets/pages/index.ets" desc="Media library files "/>
9276fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/ohosTest/ets/test/Ability.test.ets" desc="Media library files "/>
9376fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/ohosTest/ets/test/List.test.ets" desc="Media library files "/>
9476fd607bSopenharmony_ci        <filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/main/ets/Application/AbilityStage.ts" desc="Media library files "/>
9576fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/ohosTest/ets/TestRunner/OpenHarmonyTestRunner.ts" desc="Media library files "/>
9676fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/main/ets/MainAbility/MainAbility.ts" desc="Media library files "/>
9776fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/main/ets/DataShareExtAbility/DataShareExtAbility.ts" desc="Media library files "/>
9876fd607bSopenharmony_ci		<filteritem type="filepath" name="frameworks/innerkitsimpl/medialibrary_data_extension/MediaLibraryExt/entry/src/ohosTest/ets/TestAbility/TestAbility.ts" desc="Media library files "/>
9976fd607bSopenharmony_ci            </filefilter>
10076fd607bSopenharmony_ci        <filefilter name="binaryFileTypePolicyFilter" desc="Files not to check">
10176fd607bSopenharmony_ci            <filteritem type="filename" name="*.png" desc="self developed file"/>
10276fd607bSopenharmony_ci            <filteritem type="filename" name="*.jpg" desc="self developed file"/>
10376fd607bSopenharmony_ci            <filteritem type="filename" name="*.mp3" desc="self developed file"/>
10476fd607bSopenharmony_ci            <filteritem type="filename" name="*.mp4" desc="self developed file"/>
10576fd607bSopenharmony_ci        </filefilter>
10676fd607bSopenharmony_ci        </filefilterlist>
10776fd607bSopenharmony_ci    </oatconfig>
10876fd607bSopenharmony_ci</configuration>
109