Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-11957

Duplications detected by pylint are not attributed to the files where they were found

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • violations-plugin
    • None

      The duplications reported are not properly attributed to the files where they were actually found.

      Why? The pylint similarities checker computes the duplications at the end of the process, hence they are not associated with the actual files. This issue is solved by outputting the details as a part of the message in the following format:

      Sample output for report R0801
      completely_unrelated_module.py:1: [R0801] Similar lines in 2 files
      ==myapp.package.module:366
      ==myapp.package2.module2:262
          def do_something(self):
              if self.exists():
                  continue
              else:
                  raise Exception()
      

      Message detail: http://www.logilab.org/card/pylintfeatures#id2

          [JENKINS-11957] Duplications detected by pylint are not attributed to the files where they were found

          This also means the type of error is not discernable. The error ID and error description would normally be displayed against the relevant line of source code, but the source code displayed is from the wrong file, so no errors are visible.

          Jonathan Hartley added a comment - This also means the type of error is not discernable. The error ID and error description would normally be displayed against the relevant line of source code, but the source code displayed is from the wrong file, so no errors are visible.

          Mark Waite added a comment -

          The violations plugin is deprecated. It has an unresolved security vulnerability. The last commit to the source code repository was over 7 years ago. Closing the issue as "Won't fix"

          Mark Waite added a comment - The violations plugin is deprecated. It has an unresolved security vulnerability. The last commit to the source code repository was over 7 years ago. Closing the issue as "Won't fix"

            redsolo redsolo
            franciscoruiz Francisco Ruiz
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: