Quality profiles / java / Sun checks
59 results
| Active/Severity | Name [expand/collapse] | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Checks the style of array type definitions. Some like Java-style: public static void main(String[] args) and some like C-style: public static void main(String args[])
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.ArrayTypeStyleCheck
|
|||||||||||||||||||||||
|
Check that finds import statements that use the * notation.
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.imports.AvoidStarImportCheck
|
|||||||||||||||||||||||
|
Checks that constant names conform to the specified format
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.naming.ConstantNameCheck
|
|||||||||||||||||||||||
|
Checks the padding of an empty for iterator; that is whether a space is required at an empty for iterator, or such spaces are forbidden. Example :
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForIteratorPadCheck
|
|||||||||||||||||||||||
|
Checks for long source files. Rationale: If a source file becomes very long it is hard to understand. Therefore long classes should usually be refactored into several individual classes that focus on a specific task.
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.sizes.FileLengthCheck
|
|||||||||||||||||||||||
|
Checks that there are no tab characters ('\t') in the source code. Rationale:
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck
|
|||||||||||||||||||||||
|
Checks that a local variable or a parameter does not shadow a field that is defined in the same class.
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.coding.HiddenFieldCheck
|
|||||||||||||||||||||||
|
Implements Bloch, Effective Java, Item 17 - Use Interfaces only to define types. According to Bloch, an interface should describe a type. It is therefore inappropriate to define an interface that does not contain any methods but only constants. The Standard class javax.swing.SwingConstants is an example of a class that would be flagged by this check. The check can be configured to also disallow marker interfaces like java.io.Serializable, that do not contain methods or constants at all.
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.design.InterfaceIsTypeCheck
|
|||||||||||||||||||||||
|
Checks the Javadoc of a method or constructor. By default, does not check for unused throws.
To allow documented java.lang.RuntimeExceptions that are not declared, set property allowUndeclaredRTE to true.
The scope to verify is specified using the Scope class and defaults to Scope.PRIVATE.
To verify another scope, set property scope to a different scope.
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck
|
|||||||||||||||||||||||
|
Validates Javadoc comments to help ensure they are well formed. The following checks are performed:
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck
|
|||||||||||||||||||||||
|
Checks Javadoc comments for class and interface definitions. By default, does not check for author or version tags.
The scope to verify is specified using the Scope class and defaults to Scope.PRIVATE. To verify another scope, set property scope to one of the Scope constants.
To define the format for an author tag or a version tag, set property authorFormat or versionFormat respectively to a regular expression.
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTypeCheck
|
|||||||||||||||||||||||
|
Checks for the placement of left curly braces for code blocks. The policy to verify is specified using property option. Policies
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.blocks.LeftCurlyCheck
|
|||||||||||||||||||||||
|
Checks for magic numbers.
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck
|
|||||||||||||||||||||||
|
Checks that name of non-static fields conform to the specified format
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck
|
|||||||||||||||||||||||
|
Checks that method names conform to the specified format
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.naming.MethodNameCheck
|
|||||||||||||||||||||||
|
Checks the padding between the identifier of a method definition, constructor definition, method call, or constructor invocation; and the left parenthesis of the parameter list.
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.whitespace.MethodParamPadCheck
|
|||||||||||||||||||||||
|
Checks that the order of modifiers conforms to the suggestions in the Java Language specification, sections 8.1.1, 8.3.1 and 8.4.3. The correct order is : public, protected, private, abstract, static, final, transient, volatile, synchronized, native, strictfp.
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.modifier.ModifierOrderCheck
|
|||||||||||||||||||||||
|
Checks that there is a newline at the end of each file. Any source files and text files in general should end with a newline character, especially when using SCM systems such as CVS. CVS will even print a warning when it encounters a file that doesn't end with a newline.
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheck
|
|||||||||||||||||||||||
|
Checks the policy on how to wrap lines on operators.
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.whitespace.OperatorWrapCheck
|
|||||||||||||||||||||||
|
Checks that package names conform to the specified format. The default value of format has been chosen to match the requirements in the Java Language specification and the Sun coding conventions. However both underscores and uppercase letters are rather uncommon, so most configurations should probably assign value ^[a-z]+(\.[a-z][a-z0-9]*)*$ to format
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.naming.PackageNameCheck
|
|||||||||||||||||||||||
|
Checks the padding of parentheses; that is whether a space is required after a left parenthesis and before a right parenthesis, or such spaces are forbidden, with the exception that it does not check for padding of the right parenthesis at an empty for iterator.
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.whitespace.ParenPadCheck
|
|||||||||||||||||||||||
|
Checks for redundant exceptions declared in throws clause such as duplicates, unchecked exceptions or subclasses of another declared exception.
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.coding.RedundantThrowsCheck
|
|||||||||||||||||||||||
|
Checks that static, non-final fields conform to the specified format
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.naming.StaticVariableNameCheck
|
|||||||||||||||||||||||
|
Checks that type names conform to the specified format
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.naming.TypeNameCheck
|
|||||||||||||||||||||||
|
Checks that long constants are defined with an upper ell. That is ' L' and not 'l'. This is in accordance to the Java Language Specification, Section 3.10.1.
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.UpperEllCheck
|
|||||||||||||||||||||||
|
Checks visibility of class members. Only static final members may be public; other class members must be private unless property protectedAllowed or packageAllowed is set.
Checkstyle:
com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck
|
|||||||||||||||||||||||

