xref: /aosp_15_r20/libcore/tools/checkstyle/ojluni-src-test-header.xml (revision 89a6322812dc8573315e60046e7959c50dad91d4)
1*89a63228SAndroid Build Coastguard Worker<?xml version="1.0"?>
2*89a63228SAndroid Build Coastguard Worker<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd">
3*89a63228SAndroid Build Coastguard Worker<!-- Copyright (C) 2022 The Android Open Source Project
4*89a63228SAndroid Build Coastguard Worker
5*89a63228SAndroid Build Coastguard Worker     Licensed under the Apache License, Version 2.0 (the "License");
6*89a63228SAndroid Build Coastguard Worker     you may not use this file except in compliance with the License.
7*89a63228SAndroid Build Coastguard Worker     You may obtain a copy of the License at
8*89a63228SAndroid Build Coastguard Worker
9*89a63228SAndroid Build Coastguard Worker          http://www.apache.org/licenses/LICENSE-2.0
10*89a63228SAndroid Build Coastguard Worker
11*89a63228SAndroid Build Coastguard Worker     Unless required by applicable law or agreed to in writing, software
12*89a63228SAndroid Build Coastguard Worker     distributed under the License is distributed on an "AS IS" BASIS,
13*89a63228SAndroid Build Coastguard Worker     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14*89a63228SAndroid Build Coastguard Worker     See the License for the specific language governing permissions and
15*89a63228SAndroid Build Coastguard Worker     limitations under the License.
16*89a63228SAndroid Build Coastguard Worker-->
17*89a63228SAndroid Build Coastguard Worker<module name="Checker">
18*89a63228SAndroid Build Coastguard Worker  <property name="fileExtensions" value="java" />
19*89a63228SAndroid Build Coastguard Worker  <module name="RegexpHeader">
20*89a63228SAndroid Build Coastguard Worker    <property name="severity" value="error" />
21*89a63228SAndroid Build Coastguard Worker    <property name="headerFile" value="tools/checkstyle/openjdk-gplv2-copyright.pattern" />
22*89a63228SAndroid Build Coastguard Worker    <property name="multiLines" value="1,2,3,9,10" />
23*89a63228SAndroid Build Coastguard Worker  </module>
24*89a63228SAndroid Build Coastguard Worker
25*89a63228SAndroid Build Coastguard Worker  <!-- One-off Android test that is present for MTS reasons (see https://r.android.com/1987987). -->
26*89a63228SAndroid Build Coastguard Worker  <module name="BeforeExecutionExclusionFileFilter">
27*89a63228SAndroid Build Coastguard Worker    <property name="fileNamePattern"
28*89a63228SAndroid Build Coastguard Worker      value="ojluni/src/test/java/security/Provider/ProvidersTest.java" />
29*89a63228SAndroid Build Coastguard Worker  </module>
30*89a63228SAndroid Build Coastguard Worker  <!--
31*89a63228SAndroid Build Coastguard Worker  puppycrawl fails to parse the Record type implementing Serializable, and the code valid in Java 17.
32*89a63228SAndroid Build Coastguard Worker    libcore/ojluni/src/test/java/lang/reflect/records/RecordReflectionTest.java:55:39: unexpected token: implements
33*89a63228SAndroid Build Coastguard Worker    libcore/ojluni/src/test/java/lang/reflect/records/RecordReflectionTest.java:63:12: unexpected token: void
34*89a63228SAndroid Build Coastguard Worker  -->
35*89a63228SAndroid Build Coastguard Worker  <module name="BeforeExecutionExclusionFileFilter">
36*89a63228SAndroid Build Coastguard Worker    <property name="fileNamePattern"
37*89a63228SAndroid Build Coastguard Worker      value="ojluni/src/test/java/lang/reflect/records/CheckEqualityIsBasedOnFields.java" />
38*89a63228SAndroid Build Coastguard Worker    <property name="fileNamePattern"
39*89a63228SAndroid Build Coastguard Worker      value="ojluni/src/test/java/lang/reflect/records/RecordReflectionTest.java" />
40*89a63228SAndroid Build Coastguard Worker  </module>
41*89a63228SAndroid Build Coastguard Worker  <module name="BeforeExecutionExclusionFileFilter">
42*89a63228SAndroid Build Coastguard Worker    <property name="fileNamePattern"
43*89a63228SAndroid Build Coastguard Worker              value="ojluni/src/test/java/io/Serializable/records/" />
44*89a63228SAndroid Build Coastguard Worker  </module>
45*89a63228SAndroid Build Coastguard Worker
46*89a63228SAndroid Build Coastguard Worker  <module name="TreeWalker">
47*89a63228SAndroid Build Coastguard Worker    <module name="RegexpSinglelineJava">
48*89a63228SAndroid Build Coastguard Worker      <property name="severity" value="error" />
49*89a63228SAndroid Build Coastguard Worker      <property name="format" value="^package [^;]*;$" />
50*89a63228SAndroid Build Coastguard Worker      <property name="message" value="Missing package declaration" />
51*89a63228SAndroid Build Coastguard Worker      <property name="maximum" value="1" />
52*89a63228SAndroid Build Coastguard Worker      <property name="minimum" value="1" />
53*89a63228SAndroid Build Coastguard Worker    </module>
54*89a63228SAndroid Build Coastguard Worker  </module>
55*89a63228SAndroid Build Coastguard Worker</module>