-
Notifications
You must be signed in to change notification settings - Fork 14
Fix similar code checking in codeclimate #108
Conversation
analyzed for duplication. Refer https://github.com/codeclimate/codeclimate-duplication for this settings.
@@ -1,4 +1,11 @@ | |||
version: "2" | |||
plugins: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be under plugin
? Does it work putting it under checks
, as the other settings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following the Configuring in https://github.com/codeclimate/codeclimate-duplication, it needs to be under plugin. We can use Code Climate CLI (https://github.com/codeclimate/codeclimate) to do analyze locally to see if it works as we want.
I just tried this rule on this branch #109. With the threshold at 3 it does not complain about |
.codeclimate.yml
Outdated
config: | ||
languages: | ||
filters: | ||
- "(object (Identifier PropTypes))" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be really nice if this works, but I still see 6 fixed issues on codeclimate, there should only be the two propTypes that are fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, look into it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now it is correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why, but if you look at codeclimate it is saying that the propTypes duplications are fixed, then there are two new issues that are exactly the same... We can try to merge this and see what it looks like when ir runs on main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
57060e7
to
cb9c1e3
Compare
cb9c1e3
to
d9b33c9
Compare
similar-code threshold describes the mass code block to be analyzed for duplication.
Refer https://github.com/codeclimate/codeclimate-duplication
for this settings.