phpcs-gitlab
phpcs-gitlab copied to clipboard
Change fingerprint to be based on path, check_name, and source
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
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?
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:
- Issues moved to different line
- Fix one issue
- Fix all issues
- Introduced new existing issue
- Introduced new multiple issues
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.