Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-15389

Improve JavaScript and TypeScript analysis: write efficient, error-free and safe regular expressions

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9.1
    • Component/s: None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      Bug Detections:

      • S5856 3: Regular expressions should be syntactically valid
      • S5850 1: Alternatives in regular expressions should be grouped when used with anchors
      • S5868 1: Unicode Grapheme Clusters should be avoided inside regex character classes
      • S6323: Alternation in regular expressions should not contain empty alternatives
      • S6328 2: Replacement strings should reference existing regular expression groups
      • S6324 1: Regular expressions should not contain control characters
      • S6351: Regular expressions with the global flag should be used with caution
      • S5867: Regular expressions with Unicode property escapes should set Unicode flag
      • S5842: Repeated patterns in regular expressions should not match the empty string

      Code Smell Detections:

      • S5860 3: Names of regular expressions named groups should be used
      • S6035 1: Single-character alternations in regular expressions should be replaced with character classes
      • S6326 3: Regular expressions should not contain multiple spaces
      • S6331 1: Regular expressions should not contain empty groups
      • S6325 1: Regular expression literals should be used when possible
      • S5869: Character classes in regular expressions should not contain the same character twice
      • S6019: Reluctant quantifiers in regular expressions should be followed by an expression that can’t match the empty string
      • S5843: Regular expressions should not be too complicated
      • S6353: Regular expression quantifiers and character classes should be used concisely

      Security Hotspots Detection:

      • S5852: Using slow regular expressions is security-sensitive

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              belen.pruvost Belén Pruvost
              Reporter:
              sonarqube.tech SonarQube Technical user
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: