SonarQube JavaScript
  1. SonarQube JavaScript
  2. SONARJS-113

Rule: Either camelCase or UPPER_CASE styles must be used for all variable names

    Details

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

      Description

      • Title
        Either camelCase or UPPER_CASE styles must be used for all variable names
      • Description
        This rule allows you to force all variable names to use either camelCase style or UPPER_CASE style with underscores.

      example :

      var myName = "Joe Doe"; //Compliant
      var MY_NAME = "Joe Doe"; //Compliant
      var MYName = "Joe Doe"; //Non-Compliant
      var my_name = "Joe Doe"; //Non-Compliant
      var MyName = "Joe Doe"; //Non-Compliant
      
      • Violation message
        Update this variable name to comply either with the camelCase or UPPER_CASE styles
      • Default severity
        Minor

      Origin: JSHint

        Activity

        Hide
        Evgeny Mandrikov added a comment -

        According to Google JavaScript Style Guide this rule seems questionable.

        Show
        Evgeny Mandrikov added a comment - According to Google JavaScript Style Guide this rule seems questionable.

          People

          • Assignee:
            Unassigned
            Reporter:
            Freddy Mallet
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: