-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[REF] duplicate-code: Check disabled from first line to top code line #1012
[REF] duplicate-code: Check disabled from first line to top code line #1012
Conversation
92ecf56
to
7622b2a
Compare
I have 2 proposal to fix it but I don't know what is better for you.
|
I am going to close this, it is too hackish to even take in consideration. As seen from the issue you've linked, the semantics should be as close as possible to those of the current pragma handling, which means disabling for some blocks of duplicate code in a file should not disable for all the duplicate blocks in the same file. Specializing the behavior to stop counting as soon as we encounter a disabled message is not good, since afterwards, the user cannot enable the message again in the same file. If you really want to tackle this come with a better plan of how to handle the same semantics for all the files, with semantics for separate blocks from each file. For instance, if I have file a.py as:
and a file b.py without any disable for duplicate-code, I would still want the duplicate blocks to be found in b.py, as well between b.py and a.py, excepting the ones which were scoped out by the pragma. |
Ok, I got it Thanks for feedback |
Fixes / new features