Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Construct check fingerprint using only check_name, filename, and file _content_ #12

Open
duncanmmacleod opened this issue Jun 17, 2022 · 1 comment

Comments

@duncanmmacleod
Copy link
Contributor

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.

@duncanmmacleod
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant