SonarQube Java
  1. SonarQube Java
  2. SONARJAVA-144

Rule S00115: Constant names should comply with a naming convention

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      http://jira.sonarsource.com/browse/RSPEC-115

      Deprecate checkstyle:com.puppycrawl.tools.checkstyle.checks.naming.ConstantNameCheck

        Issue Links

          Activity

          Hide
          Fabrice Bellingard added a comment -

          Tested!

          Show
          Fabrice Bellingard added a comment - Tested!
          Hide
          Evgeny Mandrikov added a comment -

          Integration tests were updated.

          Show
          Evgeny Mandrikov added a comment - Integration tests were updated.
          Hide
          Evgeny Mandrikov added a comment - - edited

          Reopened, because following cases not covered:

          interface Interface {
            int GOOD_CONSTANT = 1,
                bad_constant = 2;
          }
          
          @interface AnnotationType {
            int GOOD_CONSTANT = 1,
                bad_constant = 2;
          }
          

          Note that proper fix implies change of grammar.

          Show
          Evgeny Mandrikov added a comment - - edited Reopened, because following cases not covered: interface Interface { int GOOD_CONSTANT = 1, bad_constant = 2; } @ interface AnnotationType { int GOOD_CONSTANT = 1, bad_constant = 2; } Note that proper fix implies change of grammar.
          Hide
          Evgeny Mandrikov added a comment -

          Fixed.

          Show
          Evgeny Mandrikov added a comment - Fixed.
          Hide
          Fabrice Bellingard added a comment - - edited

          Checked.

          Show
          Fabrice Bellingard added a comment - - edited Checked.
          Hide
          Evgeny Mandrikov added a comment -

          Reopened, because generates false-positives:

          public class Example {
            static final long serialVersionUID = 42L;
          }
          

          see http://docs.oracle.com/javase/1.5.0/docs/api/java/io/Serializable.html

          Show
          Evgeny Mandrikov added a comment - Reopened, because generates false-positives: public class Example { static final long serialVersionUID = 42L; } see http://docs.oracle.com/javase/1.5.0/docs/api/java/io/Serializable.html
          Hide
          Evgeny Mandrikov added a comment -

          Fixed.

          Show
          Evgeny Mandrikov added a comment - Fixed.
          Hide
          Fabrice Bellingard added a comment -

          Damn, even the base classes of Java don't respect the naming conventions... where are we going?
          Checked.

          Show
          Fabrice Bellingard added a comment - Damn, even the base classes of Java don't respect the naming conventions... where are we going? Checked.
          Hide
          Freddy Mallet added a comment -

          Manually tested !

          Show
          Freddy Mallet added a comment - Manually tested !

            People

            • Assignee:
              Evgeny Mandrikov
              Reporter:
              Evgeny Mandrikov
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: