Skip to content

Commit

Permalink
Issue checkstyle#929: update sevntu_checks.xml and move Log to top of…
Browse files Browse the repository at this point in the history
… class (will be squashed if it works)
  • Loading branch information
crud3 committed Oct 15, 2017
1 parent f2c96b2 commit 57bcc6f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion config/checkstyle_sevntu_checks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@
<module name="ForbidWildcardAsReturnType"/>
<module name="CustomDeclarationOrder">
<property name="customDeclarationOrder"
value="InnerEnum(public .*)
value="Field((private) final Log ([\w]*L|l)og)
### InnerEnum(public .*)
### Field(public static final)
### Field(public static .*)
### Field(protected static final)
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/com/puppycrawl/tools/checkstyle/Checker.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@
* @author Andrei Selkin
*/
public class Checker extends AutomaticBean implements MessageDispatcher, RootModule {
/** Message to use when an exception occurs and should be printed as a violation. */
public static final String EXCEPTION_MSG = "general.exception";


/** Logger for Checker. */
private final Log log;

/** Message to use when an exception occurs and should be printed as a violation. */
public static final String EXCEPTION_MSG = "general.exception";

/** Maintains error count. */
private final SeverityLevelCounter counter = new SeverityLevelCounter(
SeverityLevel.ERROR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@
*/
public class TranslationCheck extends AbstractFileSetCheck {

/** Logger for TranslationCheck. */
private final Log log;

/**
* A key is pointing to the warning message text for missing key
* in "messages.properties" file.
Expand All @@ -125,9 +128,6 @@ public class TranslationCheck extends AbstractFileSetCheck {
*/
private static final String WRONG_LANGUAGE_CODE_KEY = "translation.wrongLanguageCode";

/** Logger for TranslationCheck. */
private final Log log;

/**
* Regexp string for default translation files.
* For example, messages.properties.
Expand Down

0 comments on commit 57bcc6f

Please sign in to comment.