Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Conversation

ABaldwinHunter
Copy link
Contributor

Using the number of occurrences of duplicated code as a unique
identifier of the issue makes the fingerprint non-deterministic
with respect to a given issue at a site of the duplicated code.

Opting to use checkname instead.

Fixes false positives in PR comparisons: https://codeclimate.com/repos/569fa9e70c40f068790031e2/pull/3#duplication

cc @codeclimate/review

Using the number of occurrences of duplicated code as a unique
identifier of the issue makes the fingerprint non-deterministic
with respect to a given issue at a site of the duplicated code.

Opting to use checkname instead.
@gdiggs
Copy link
Contributor

gdiggs commented Jan 29, 2016

LGTM

ABaldwinHunter pushed a commit that referenced this pull request Jan 29, 2016
Fix fingerprint bug - don't use num occurrences
@ABaldwinHunter ABaldwinHunter merged commit dfdc557 into master Jan 29, 2016
@ABaldwinHunter ABaldwinHunter deleted the abh-fingerprints branch January 29, 2016 17:16
@@ -86,7 +86,7 @@ def fingerprint
digest << "-"
digest << current_sexp.mass.to_s
digest << "-"
digest << occurrences.to_s
digest << check_name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Classic also uses the type of the sexp's root node, I think. That's an extra piece of info to make the fingerprint more unique that may be worth adding.

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

Successfully merging this pull request may close these issues.

3 participants