phpcs-gitlab icon indicating copy to clipboard operation
phpcs-gitlab copied to clipboard

Change fingerprint to be based on path, check_name, and source

Open Ovissse opened this issue 3 years ago • 2 comments

Currently noticed, that gitlab reports old code style errors as new. Turns out that if error moved to different line the fingerprint for it changes as well and gitlab treat it as new code style problem. Did some digging and found out that codeclimate computes fingerprint differently. Instead of relaying on line, they read content of that line and strip whitespaces. Reference to codeclimate fingerpint pr

Ovissse avatar Oct 25 '22 19:10 Ovissse

That is a good catch, thank you. Will GitLab report multiple issues if a code block is used multiple times in a file and has an issue?

micheh avatar Oct 27 '22 20:10 micheh

Ok codeclimate solution doesn't work very well then there are multiple same code lines with same code quality issues in the same file. GitLab treats issues with same fingerprint as one.

Example of original problem:

Examples of new problems after fingerprint calculation change:

So fixing one problem opens whole can of more problems. GitLab doesn't behave nicely with issues that have same fingerprint. This will need different fingerprint calculation.

Ovissse avatar Oct 31 '22 06:10 Ovissse