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

Rule S1226 should report on the parameter assignment, not parameter declaration

    Details

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

      Description

      Rule S1226 (RSPEC-1226) raises an issue on the parameter declaration instead of raising on its assignment as the RSPEC says it should, and as it is done for other languages.

      def foo(param):  # Issue raised here
          param = 42  # It should be raised here
      

        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: