• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3  ~ Copyright (C) 2016 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<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd" [
18    <!ENTITY defaultCopyrightCheck SYSTEM "../../../../../prebuilts/checkstyle/default-copyright-check.xml">
19    <!ENTITY defaultJavadocChecks SYSTEM "../../../../../prebuilts/checkstyle/default-javadoc-checks.xml">
20    <!ENTITY defaultTreewalkerChecks SYSTEM "../../../../../prebuilts/checkstyle/default-treewalker-checks.xml">
21    <!ENTITY defaultModuleChecks SYSTEM "../../../../../prebuilts/checkstyle/default-module-checks.xml">
22    ]>
23
24<module name="Checker">
25    &defaultModuleChecks;
26    &defaultCopyrightCheck;
27    <module name="TreeWalker">
28        &defaultJavadocChecks;
29        &defaultTreewalkerChecks;
30
31        <!-- Custom support library check for @RestrictTo / @hide. -->
32        <module name="com.android.support.checkstyle.MismatchedAnnotationCheck">
33            <property name="severity" value="error" />
34            <property name="tag" value="hide" />
35            <property name="annotation" value="android.support.annotation.RestrictTo" />
36            <property name="messageKey" value="annotation.missing.hide" />
37            <message key="annotation.missing.hide" value="Must include both @RestrictTo annotation and @hide Javadoc tag."/>
38        </module>
39        <!-- Custom support library check for methods with @Test to have test size annotation -->
40        <module name="com.android.support.checkstyle.TestSizeAnnotationCheck">
41            <property name="severity" value="error" />
42        </module>
43    </module>
44</module>
45