diff --git a/src/site/site.xml b/src/site/site.xml index a3671c928..2b6dc5fc7 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -67,6 +67,11 @@ + + + + + diff --git a/src/xdocs/google_style.xml b/src/xdocs/google_style.xml new file mode 100644 index 000000000..f5aefbfd2 --- /dev/null +++ b/src/xdocs/google_style.xml @@ -0,0 +1,1286 @@ + + + + + + Google's Style + Checkstyle Development Team + + + +
+ +

+ Last changed in + Google Java Style + : March 21, 2014 +

+ +

+ The latest + html report +

+

+ Last + Google style checkstyle configuration +

+
+ +

+ "--" - There is no rule in this paragraph. +
+ "↓" - This paragraph is the high-level point of some group. +
+ + - Exiting Check covers all requirements from Google. +
+ + - Exiting Check covers some part of requirements from Google. +
+ + - Requirements are not possible to check by Checkstyle at all. +
+

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Google's Java Style RuleCheckstyle CheckApplied to config
+ + 1 Introduction + + --
+ 1.1 Terminology notes + --
+ 1.2 Guide notes + -- +
+ + 2 Source file basics + +
+ 2.1 File name + + + OuterTypeFilename + + config +
+ test +
+ + 2.2 File encoding: UTF-8 + + +
+ Utf8EncodingCheck +
[]
+ 2.3.1 Whitespace characters + + + FileTabCharacter + + config +
+ test +
+ 2.3.2 Special escape sequences + + + IllegalTokenText + + config
+ test +
+ 2.3.3 Non-ASCII characters + + + AvoidEscapedUnicodeCharactersCheck + + config +
+ test +
+ + 3 Source file structure + + + + EmptyLineSeparatorCheck + + config +
+ test +
+ 3.1 License or copyright information, if present + --
+ 3.2 Package statement + + + LineLength +
+
+ + NoLineWrapCheck +
+ config +
+ test +
+ config +
+ test +
+ + 3.3 Import statements + +
+ 3.3.1 No wildcard imports + + + AvoidStarImport + + config +
+ test +
+ 3.3.2 No line-wrapping + + + LineLength +
+ + NoLineWrapCheck +
+
+ config +
+ test +
+ config +
+ test +
+ 3.3.3 Ordering and spacing + + + CustomImportOrderCheck + + config +
+ test +
+ + 3.4 Class declaration + +
+ 3.4.1 Exactly one top-level class declaration + + + OneTopLevelClass + + config +
+ test +
+ 3.4.2 Class member ordering + --
+ 3.4.2.1 Overloads: never split + + + OverloadMethodsDeclarationOrderCheck + + config +
+ test +
+ + 4 Formatting + + --
+ + 4.1 Braces + +
+ 4.1.1 Braces are used where optional + + + NeedBraces + + config +
+ test +
+ 4.1.2 Nonempty blocks: K & R style + + + LeftCurly + , + + RightCurly + + config +
+ config +
+ test +
+ 4.1.3 Empty blocks: may be concise + + + EmptyBlock + + config
+ test +
+ 4.2 Block indentation: +2 spaces + + + Indentation + + config
+ [test(will provided later)] +
+ 4.3 One statement per line + + + OneStatementPerLine + + config +
+ test +
+ 4.4 Column limit: 80 or 100 + + + LineLength +
+ We can detect URL with protocol type as http://, https:// etc. +
+ JSNI + Comments and javadoc support appear in Checkstyle +
+ config +
+ test +
+ + 4.5 Line-wrapping + + --
+ 4.5.1 Where to break + + + OperatorWrap +
+ + SeparatorWrap +
+ config +
+ test +
+ config +
+ test +
+ 4.5.2 Indent continuation lines at least +4 spaces + + + Indentation + + config
+ [test(will provided later)] +
+ + 4.6 Whitespace + +
+ 4.6.1 Vertical Whitespace + + + EmptyLineSeparatorCheck + + config +
+ test +
+ 4.6.2 Horizontal whitespace + + + WhitespaceAround +
+ + GenericWhitespace +
+ config +
+ test +
+ config +
+ test +
+ 4.6.3 Horizontal alignment: never required + --
+ 4.7 Grouping parentheses: recommended + --
+ + 4.8 Specific constructs + +
+ 4.8.1 Enum classes + --
+ 4.8.2 Variable declarations +
+ 4.8.2.1 One variable per declaration + + + MultipleVariableDeclarations + + config +
+ test +
+ 4.8.2.2 Declared when needed, initialized as soon as + possible + + + + VariableDeclarationUsageDistance +
+
+ config
+ [test] +
+ 4.8.3 Arrays +
+ 4.8.3.1 Array initializers: can be "block-like" + --
+ 4.8.3.2 No C-style array declarations + + + ArrayTypeStyle + + config +
+ test +
+ 4.8.4 Switch statements + --
+ 4.8.4.1 Indentation + + + Indentation + + config
+ [test(will provided later)] +
+ 4.8.4.2 Fall-through: commented + + + FallThrough + + config +
+ test +
+ 4.8.4.3 The default case is present + + + MissingSwitchDefault + + config +
+ test +
+ 4.8.5 Annotations + + AnnotationIndentation +
+ 4.8.6 Comments +
+ 4.8.6.1 Block comment style + + +
+ 4.8.7 Modifiers + + + ModifierOrder + + config +
+ test +
+ 4.8.8 Numeric Literals + + + UpperEll + + config +
+ test +
+ + 5 Naming + +
+ 5.1 Rules common to all identifiers + "5.2 Rules of identifier type" already includes this rule. +
+ + 5.2 Rules by identifier type + +
+ 5.2.1 Package names + + + PackageName + + config +
+ test +
+ 5.2.2 Class names + + + TypeName + + config +
+ test +
+ 5.2.3 Method names + + +
+ 5.2.4 Constant names + + + Every constant is a static final field, +
+ but not all static final fields are +
+ constants - impossible to check such rule. +
+ 5.2.5 Non-constant field names + + + MemberName + + config +
+ test +
+ 5.2.6 Parameter names + + + ParameterName + + config +
+ test +
+ 5.2.7 Local variable names + + + LocalVariableName + + config +
+ test +
+ 5.2.8 Type variable names + + + MethodTypeParameterName +
+ + ClassTypeParameterName +
+ config +
+ config +
+ test +
+ 5.3 Camel case: defined + + + AbbreviationAsWordInName +
+
+ config +
+ test +
+ + 6 Programming Practices + +
+ 6.1 @Override: always used + + + That validation could not be checked by Checkstyle. It's + need to + take a look as parent class. But Checkstyle have no way + open or + look at another Class file. +
+ 6.2 Caught exceptions: not ignored + + NotIgnoredExceptions +
+ 6.3 Static members: qualified using class + + +
+ 6.4 Finalizers: not used + + + NoFinalizer + + config +
+ test +
+ + 7 Javadoc + +
+ + 7.1 Formatting + +
+ 7.1.1 General form + + SingleLineJavaDoc + []
+ 7.1.2 Paragraphs + + JavaDocParagraph + []
+ 7.1.3 At-clauses + + AtClauseOrder + , + JavaDocTagCuntionuousIndentation + , + NonEmptyAtClauseDescription + []
+ 7.2 The summary fragment + + SummaryJavaDocCheck + (check for text before any at-clause). +
+ additionally we need to have list of forbidden phrases +
+ in the beginning of summary (regexp). +
[]
+ + 7.3 Where Javadoc is used + + + JavadocMethod + []
+ 7.3.1 Exception: self-explanatory methods + + JavadocSelfExplanatoryMethod +
+ 7.3.2 Exception: overrides + --
+
+
+ +
diff --git a/src/xdocs/style_configs.xml b/src/xdocs/style_configs.xml new file mode 100644 index 000000000..a605c98db --- /dev/null +++ b/src/xdocs/style_configs.xml @@ -0,0 +1,24 @@ + + + + + + Style Configurations + Checkstyle Development Team + + + +
+

+ This section contains tables to display coverage Java styles by Checkstyle. +

+
+ +
+ + + + + diff --git a/src/xdocs/sun_style.xml b/src/xdocs/sun_style.xml new file mode 100644 index 000000000..d9aa1e1b4 --- /dev/null +++ b/src/xdocs/sun_style.xml @@ -0,0 +1,38 @@ + + + + + + Google's Style + Checkstyle Development Team + + + +
+ +

+ Will be provided later +

+
+ + + + + + + + + + + + + + + + +
Sun Style RuleCheckstyle CheckApplied to config
+
+
+ +