1<?xml version="1.0"?>
2<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd">
3<!-- Copyright (C) 2022 The Android Open Source Project
4
5     Licensed under the Apache License, Version 2.0 (the "License");
6     you may not use this file except in compliance with the License.
7     You may obtain a copy of the License at
8
9          http://www.apache.org/licenses/LICENSE-2.0
10
11     Unless required by applicable law or agreed to in writing, software
12     distributed under the License is distributed on an "AS IS" BASIS,
13     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14     See the License for the specific language governing permissions and
15     limitations under the License.
16-->
17<module name="Checker">
18  <!-- Note: we include Java and C files from upstream. There are generated .h files and .cpp
19    files from Android that don't fit the pattern used to check for the upstream license. -->
20  <property name="fileExtensions" value="java, c" />
21  <module name="RegexpHeader">
22    <property name="severity" value="error" />
23    <property name="headerFile" value="tools/checkstyle/openjdk-gplv2-plus-classpath-copyright.pattern" />
24    <property name="multiLines" value="2,3,4,5" />
25  </module>
26  <!-- The following files have Android GPL+classpath headers, not upstream.
27       One filter per pattern is required. -->
28  <module name="BeforeExecutionExclusionFileFilter">
29    <property name="fileNamePattern"
30      value="ojluni/src/main/java/java/lang/invoke/(MethodHandleImpl.java|Transformers.java)" />
31  </module>
32  <module name="BeforeExecutionExclusionFileFilter">
33    <property name="fileNamePattern"
34      value="ojluni/src/main/java/(java/time/zone/IcuZoneRulesProvider.java|sun/nio/ch/FileDescriptorHolderSocketImpl.java)" />
35  </module>
36  <module name="BeforeExecutionExclusionFileFilter">
37    <property name="fileNamePattern"
38      value="ojluni/src/main/native/Math.c" />
39  </module>
40  <!-- File from upstream with formatting that doesn't fit our pattern. -->
41  <module name="BeforeExecutionExclusionFileFilter">
42    <property name="fileNamePattern"
43      value="ojluni/src/main/java/sun/util/locale/UnicodeLocaleExtension.java" />
44  </module>
45  <!-- Deprecated AOSP sources in ojluni/annotations/hiddenapi. -->
46  <module name="BeforeExecutionExclusionFileFilter">
47    <property name="fileNamePattern"
48      value="ojluni/annotations/hiddenapi/sun/security/x509/AVA(Comparator|Keyword).java" />
49  </module>
50  <module name="BeforeExecutionExclusionFileFilter">
51    <property name="fileNamePattern"
52      value="ojluni/annotations/hiddenapi/sun/security/util/MemoryCache.java" />
53  </module>
54</module>
55