flake8-gl-codeclimate
flake8-gl-codeclimate copied to clipboard
Construct check fingerprint using only check_name, filename, and file _content_
I love flake-gl-codeclimate, but every time I add new code to a file, any existing lint issues further down in the same file get flagged twice in the new code quality report: once because the old code location was 'removed' (reported as fixed), and a second time for the new code location (reported as new).
I think this can be addressed by constructing the check fingerprint using only the following
- the check name
- the filename
- the content of the line that triggered the check
I think the important thing is that the final item is the content of the line, not the line number, which is subject to change. I think with this system if an issue persists but has a new location in the same file, it will be reported with the same fingerprint, so will not be duplicated in the merge request UI.
Am happy to work this up into a PR if the idea is sensible.
It occurs to me now that this idea falls down if there are instances of identical code in two different places in the same file that emit the same lint issue.