org.jcoderz.phoenix.report
Class CheckstyleFindingType

java.lang.Object
  extended by org.jcoderz.phoenix.report.FindingType
      extended by org.jcoderz.phoenix.report.CheckstyleFindingType

public final class CheckstyleFindingType
extends FindingType

Enumeration type for checkstyle findings. It also holds a method to get the finding type from the message received. This is needed due to the fact that there is no reliable enumeration of checkstyle findings delivered with checkstyle.

New patterns might be needed with each checkstyle update.

Once assigned the symbols should not be changed without a urgent need. The symbols are used to generate wiki page link.

Author:
Andreas Mandel

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jcoderz.phoenix.report.FindingType
FindingType.LazyInit
 
Field Summary
static CheckstyleFindingType CS_BOOLEAN_EXPRESSION_COMPLEXITY
          Checkstyle finding type that relates to: Boolean expression complexity is ...
static CheckstyleFindingType CS_BRACE_ON_NEW_LINE
          Checkstyle finding type that relates to: The brace should not be on a new line.
static CheckstyleFindingType CS_CONTAINS_TAB
          Checkstyle finding type that relates to: Line contains a tab character.
static CheckstyleFindingType CS_EMPTY_BLOCK
          Checkstyle finding type that relates to: Empty block detected.
static CheckstyleFindingType CS_EQUALS_NEWLINE
          Checkstyle finding type that relates to: The equals operator should be on a new line.
static CheckstyleFindingType CS_EXCEPTION
          A internal checkstyle exception was triggered we shoulds also report this!
static CheckstyleFindingType CS_EXCEPTION_CLASS_NOT_FOUND
          Checkstyle finding type that relates to: Unable to get class information for .....
static CheckstyleFindingType CS_FIELD_UNUSED
          Checkstyle finding type that relates to: Field is never used.
static CheckstyleFindingType CS_HEADER_MISMATCH
          Checkstyle finding type that relates to: Line does not match expected header line.
static CheckstyleFindingType CS_HIDDEN_FIELD
          Checkstyle finding type that relates to: A field is hidden.
static CheckstyleFindingType CS_ILLEGAL_INDENTATION
          Checkstyle finding type that relates to: Indentation must be a multiple of 4.
static CheckstyleFindingType CS_ILLEGAL_LINE
          Checkstyle finding type that relates to: Line matches a illegal pattern.
static CheckstyleFindingType CS_IMPORT_UNUSED
          Checkstyle finding type that relates to: Unused import.
static CheckstyleFindingType CS_INLINE_CONDITIONAL
          Checkstyle finding type that relates to: Avoid inline conditionals.
static CheckstyleFindingType CS_INTERFACE_TYPE
          Checkstyle finding type that relates to: Interfaces should describe a type and hence have methods.
static CheckstyleFindingType CS_INVALID_PATTERN
          Checkstyle finding type that relates to: Name does not match given pattern.
static CheckstyleFindingType CS_JAVADOC_CLASS_INFO
          Checkstyle finding type that relates to: Unable to get class information for something.
static CheckstyleFindingType CS_JAVADOC_EMPTY_DESC
          Checkstyle finding type that relates to: Missing a Javadoc comment.
static CheckstyleFindingType CS_JAVADOC_EXPECTED_TAG
          Checkstyle finding type that relates to: Missing Javadoc tag.
static CheckstyleFindingType CS_JAVADOC_HTML_UNCLOSED
          Checkstyle finding type that relates to: Incomplete/Unclosed HTML tag.
static CheckstyleFindingType CS_JAVADOC_MISSING
          Checkstyle finding type that relates to: Missing a Javadoc comment.
static CheckstyleFindingType CS_JAVADOC_PATTERN
          Checkstyle finding type that relates to: Javadoc Pattern.
static CheckstyleFindingType CS_JAVADOC_RETURN_EXPECTED
          Checkstyle finding type that relates to: Expected an @return tag.
static CheckstyleFindingType CS_JAVADOC_UNUSED_TAG
          Checkstyle finding type that relates to: Unused Javadoc tag.
static CheckstyleFindingType CS_LINE_TO_LONG
          Checkstyle finding type that relates to: Line is longer than the allowed number of characters.
static CheckstyleFindingType CS_LOCAL_VARIABLE_UNUSED
          Checkstyle finding type that relates to: Local variable unused.
static CheckstyleFindingType CS_MAGIC
          Checkstyle finding type that relates to: Dont use magics in the code.
static CheckstyleFindingType CS_MAX_LEN_ANON_CLASS
          Checkstyle finding type that relates to: Length of anonymous inner class exceeds the maximum allowed length.
static CheckstyleFindingType CS_MAX_LEN_METHOD
          Checkstyle finding type that relates to: Method length exceeds the maximum allowed length.
static CheckstyleFindingType CS_METHOD_UNUSED
          Checkstyle finding type that relates to: Method unused.
static CheckstyleFindingType CS_MISSING_PACKAGE_DOCUMENTATION
          Checkstyle finding type that relates to: Missing package documentation file.
static CheckstyleFindingType CS_MISSING_TAG
          Checkstyle finding type that relates to: A required javadoc tag is missing.
static CheckstyleFindingType CS_NESTED_TRY_DEPTH
          Checkstyle finding type that relates to: Deeply nested tries.
static CheckstyleFindingType CS_NO_LOG_LEVEL_INFO
          Checkstyle finding type that relates to: Invalid log level for trace log.
static CheckstyleFindingType CS_NO_NEWLINE
          Checkstyle finding type that relates to: File does not end with a newline.
static CheckstyleFindingType CS_NO_WHITESPACE_AFTER
          Checkstyle finding type that relates to: Whitespace expected.
static CheckstyleFindingType CS_NO_WHITESPACE_AFTER_MSG_DECL
          Checkstyle finding type that relates to: After the method declaration there should be a ' '.
static CheckstyleFindingType CS_NO_WHITESPACE_BEFORE
          Checkstyle finding type that relates to: Whitespace expected.
static CheckstyleFindingType CS_NUMBER_OF_PARAMETERS
          Checkstyle finding type that relates to: Too many parameters.
static CheckstyleFindingType CS_REDUNDANT_MODIFIER
          Checkstyle finding type that relates to: Avoid redundant code.
static CheckstyleFindingType CS_REDUNDANT_THROWS_SUBCLASS
          Checkstyle finding type that relates to: Redundant throws with subclass.
static CheckstyleFindingType CS_REDUNDANT_THROWS_UNCHECKED
          Checkstyle finding type that relates to: Redundant throws with unchecked exception.
static CheckstyleFindingType CS_SPECIAL_INDENT
          Checkstyle finding type that relates to: Indentation violation.
static CheckstyleFindingType CS_STRING_EQUALS_COMPARISON
          Checkstyle finding type that relates to: String comparison with ==.
static CheckstyleFindingType CS_TODO
          Checkstyle finding type that relates to: Comment matches to-do format.
static CheckstyleFindingType CS_TYPE_NOT_ALLOWED
          Checkstyle finding type that relates to: Using '.*' is not allowed.
static CheckstyleFindingType CS_UPPER_CASE_L
          Checkstyle finding type that relates to: Long constants should use a uppercase L.
static CheckstyleFindingType CS_WHITESPACE_AFTER
          Checkstyle finding type that relates to: Whitespace not allowed.
static CheckstyleFindingType CS_WHITESPACE_BEFORE
          Checkstyle finding type that relates to: Whitespace not allowed.
 
Method Summary
static FindingType detectFindingTypeForMessage(String message)
          Reads the given message and tries to find a matching finding type.
 Severity getSeverity()
           
static void initialize()
          Init of the enum.
 
Methods inherited from class org.jcoderz.phoenix.report.FindingType
equals, fromString, getDescription, getShortText, getSymbol, hashCode, initialize, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CS_INTERFACE_TYPE

public static final CheckstyleFindingType CS_INTERFACE_TYPE
Checkstyle finding type that relates to: Interfaces should describe a type and hence have methods.


CS_LINE_TO_LONG

public static final CheckstyleFindingType CS_LINE_TO_LONG
Checkstyle finding type that relates to: Line is longer than the allowed number of characters.


CS_HEADER_MISMATCH

public static final CheckstyleFindingType CS_HEADER_MISMATCH
Checkstyle finding type that relates to: Line does not match expected header line.


CS_JAVADOC_MISSING

public static final CheckstyleFindingType CS_JAVADOC_MISSING
Checkstyle finding type that relates to: Missing a Javadoc comment.


CS_JAVADOC_EMPTY_DESC

public static final CheckstyleFindingType CS_JAVADOC_EMPTY_DESC
Checkstyle finding type that relates to: Missing a Javadoc comment.


CS_JAVADOC_UNUSED_TAG

public static final CheckstyleFindingType CS_JAVADOC_UNUSED_TAG
Checkstyle finding type that relates to: Unused Javadoc tag.


CS_JAVADOC_RETURN_EXPECTED

public static final CheckstyleFindingType CS_JAVADOC_RETURN_EXPECTED
Checkstyle finding type that relates to: Expected an @return tag.


CS_JAVADOC_EXPECTED_TAG

public static final CheckstyleFindingType CS_JAVADOC_EXPECTED_TAG
Checkstyle finding type that relates to: Missing Javadoc tag.


CS_JAVADOC_CLASS_INFO

public static final CheckstyleFindingType CS_JAVADOC_CLASS_INFO
Checkstyle finding type that relates to: Unable to get class information for something.


CS_JAVADOC_HTML_UNCLOSED

public static final CheckstyleFindingType CS_JAVADOC_HTML_UNCLOSED
Checkstyle finding type that relates to: Incomplete/Unclosed HTML tag.


CS_INVALID_PATTERN

public static final CheckstyleFindingType CS_INVALID_PATTERN
Checkstyle finding type that relates to: Name does not match given pattern.


CS_NO_WHITESPACE_AFTER_MSG_DECL

public static final CheckstyleFindingType CS_NO_WHITESPACE_AFTER_MSG_DECL
Checkstyle finding type that relates to: After the method declaration there should be a ' '.


CS_TODO

public static final CheckstyleFindingType CS_TODO
Checkstyle finding type that relates to: Comment matches to-do format.


CS_MAGIC

public static final CheckstyleFindingType CS_MAGIC
Checkstyle finding type that relates to: Dont use magics in the code.


CS_WHITESPACE_AFTER

public static final CheckstyleFindingType CS_WHITESPACE_AFTER
Checkstyle finding type that relates to: Whitespace not allowed.


CS_NO_WHITESPACE_AFTER

public static final CheckstyleFindingType CS_NO_WHITESPACE_AFTER
Checkstyle finding type that relates to: Whitespace expected.


CS_WHITESPACE_BEFORE

public static final CheckstyleFindingType CS_WHITESPACE_BEFORE
Checkstyle finding type that relates to: Whitespace not allowed.


CS_NO_WHITESPACE_BEFORE

public static final CheckstyleFindingType CS_NO_WHITESPACE_BEFORE
Checkstyle finding type that relates to: Whitespace expected.


CS_MISSING_TAG

public static final CheckstyleFindingType CS_MISSING_TAG
Checkstyle finding type that relates to: A required javadoc tag is missing.


CS_HIDDEN_FIELD

public static final CheckstyleFindingType CS_HIDDEN_FIELD
Checkstyle finding type that relates to: A field is hidden.


CS_CONTAINS_TAB

public static final CheckstyleFindingType CS_CONTAINS_TAB
Checkstyle finding type that relates to: Line contains a tab character.


CS_NO_NEWLINE

public static final CheckstyleFindingType CS_NO_NEWLINE
Checkstyle finding type that relates to: File does not end with a newline.


CS_MAX_LEN_METHOD

public static final CheckstyleFindingType CS_MAX_LEN_METHOD
Checkstyle finding type that relates to: Method length exceeds the maximum allowed length.


CS_MAX_LEN_ANON_CLASS

public static final CheckstyleFindingType CS_MAX_LEN_ANON_CLASS
Checkstyle finding type that relates to: Length of anonymous inner class exceeds the maximum allowed length.


CS_EMPTY_BLOCK

public static final CheckstyleFindingType CS_EMPTY_BLOCK
Checkstyle finding type that relates to: Empty block detected.


CS_IMPORT_UNUSED

public static final CheckstyleFindingType CS_IMPORT_UNUSED
Checkstyle finding type that relates to: Unused import.


CS_SPECIAL_INDENT

public static final CheckstyleFindingType CS_SPECIAL_INDENT
Checkstyle finding type that relates to: Indentation violation.


CS_NESTED_TRY_DEPTH

public static final CheckstyleFindingType CS_NESTED_TRY_DEPTH
Checkstyle finding type that relates to: Deeply nested tries.


CS_NUMBER_OF_PARAMETERS

public static final CheckstyleFindingType CS_NUMBER_OF_PARAMETERS
Checkstyle finding type that relates to: Too many parameters.


CS_METHOD_UNUSED

public static final CheckstyleFindingType CS_METHOD_UNUSED
Checkstyle finding type that relates to: Method unused.


CS_LOCAL_VARIABLE_UNUSED

public static final CheckstyleFindingType CS_LOCAL_VARIABLE_UNUSED
Checkstyle finding type that relates to: Local variable unused.


CS_ILLEGAL_INDENTATION

public static final CheckstyleFindingType CS_ILLEGAL_INDENTATION
Checkstyle finding type that relates to: Indentation must be a multiple of 4.


CS_FIELD_UNUSED

public static final CheckstyleFindingType CS_FIELD_UNUSED
Checkstyle finding type that relates to: Field is never used.


CS_EQUALS_NEWLINE

public static final CheckstyleFindingType CS_EQUALS_NEWLINE
Checkstyle finding type that relates to: The equals operator should be on a new line.


CS_ILLEGAL_LINE

public static final CheckstyleFindingType CS_ILLEGAL_LINE
Checkstyle finding type that relates to: Line matches a illegal pattern.


CS_UPPER_CASE_L

public static final CheckstyleFindingType CS_UPPER_CASE_L
Checkstyle finding type that relates to: Long constants should use a uppercase L.


CS_NO_LOG_LEVEL_INFO

public static final CheckstyleFindingType CS_NO_LOG_LEVEL_INFO
Checkstyle finding type that relates to: Invalid log level for trace log.


CS_BRACE_ON_NEW_LINE

public static final CheckstyleFindingType CS_BRACE_ON_NEW_LINE
Checkstyle finding type that relates to: The brace should not be on a new line.


CS_INLINE_CONDITIONAL

public static final CheckstyleFindingType CS_INLINE_CONDITIONAL
Checkstyle finding type that relates to: Avoid inline conditionals.


CS_REDUNDANT_MODIFIER

public static final CheckstyleFindingType CS_REDUNDANT_MODIFIER
Checkstyle finding type that relates to: Avoid redundant code.


CS_JAVADOC_PATTERN

public static final CheckstyleFindingType CS_JAVADOC_PATTERN
Checkstyle finding type that relates to: Javadoc Pattern.


CS_REDUNDANT_THROWS_SUBCLASS

public static final CheckstyleFindingType CS_REDUNDANT_THROWS_SUBCLASS
Checkstyle finding type that relates to: Redundant throws with subclass..


CS_REDUNDANT_THROWS_UNCHECKED

public static final CheckstyleFindingType CS_REDUNDANT_THROWS_UNCHECKED
Checkstyle finding type that relates to: Redundant throws with unchecked exception..


CS_BOOLEAN_EXPRESSION_COMPLEXITY

public static final CheckstyleFindingType CS_BOOLEAN_EXPRESSION_COMPLEXITY
Checkstyle finding type that relates to: Boolean expression complexity is ... (max allowed is ...)..


CS_STRING_EQUALS_COMPARISON

public static final CheckstyleFindingType CS_STRING_EQUALS_COMPARISON
Checkstyle finding type that relates to: String comparison with ==..


CS_MISSING_PACKAGE_DOCUMENTATION

public static final CheckstyleFindingType CS_MISSING_PACKAGE_DOCUMENTATION
Checkstyle finding type that relates to: Missing package documentation file..


CS_EXCEPTION_CLASS_NOT_FOUND

public static final CheckstyleFindingType CS_EXCEPTION_CLASS_NOT_FOUND
Checkstyle finding type that relates to: Unable to get class information for ......


CS_TYPE_NOT_ALLOWED

public static final CheckstyleFindingType CS_TYPE_NOT_ALLOWED
Checkstyle finding type that relates to: Using '.*' is not allowed..


CS_EXCEPTION

public static final CheckstyleFindingType CS_EXCEPTION
A internal checkstyle exception was triggered we shoulds also report this!

Method Detail

detectFindingTypeForMessage

public static FindingType detectFindingTypeForMessage(String message)
Reads the given message and tries to find a matching finding type.

Parameters:
message - the message to read.
Returns:
the finding type matching to the message, or null if no such type was found.

getSeverity

public Severity getSeverity()
Returns:
the severity assigned to findings of this type by default.

initialize

public static void initialize()
Init of the enum.



Copyright 2007 The jCoderZ Project.