Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-4017

Reintroduce S1697 to detect specific cases of null pointer dereferences

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 7.5
    • Component/s: Rules
    • Labels:
      None

      Description

      S1697 was superseded by S2259 a few years ago and recently dropped (SONARJAVA-3828). However, S2295 has FP although S1697 has none. This has led to users' complaint on community post.

      We will make this as a new deprecation rule guideline:
      When a rule with broad scope exist but has possibly many FPs and that a rule with a smaller scope fully included in the broad rule exists and has no FP, the rule with the small scope should not be deprecated. We accept the duplicate.

      At least we would like to provide to the user some recommendation in the rule documentation indicating to fix the rule with smaller scope first. Ideally the issue on the broader scope should be hidden to the user.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            richard.mathis Richard Mathis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: