Uploaded image for project: 'SonarPython'
  1. SonarPython
  2. SONARPY-703

False Negative for S905 on identity checks (is, is not)

    Details

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

      Description

      RSPEC-905 should raise an issue on useless identity checks.

      def identity_op(param):
          """Identity operator"""
          param is None  # Noncompliant. False Negative.
          param is not None  # Noncompliant. False Negative.
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                nicolas.harraudeau Nicolas Harraudeau
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: