ignore rules via comments in source
jumanjiman opened this issue · 5 comments
Currently it is possible to either:
- ignore a rule for all files, or
- ignore a file for all rules
It would be nice to be able to fine-tune the configuration, similar to these:
Hey @jumanjiman thank you for opening an issue!
Would you be interested in implementing this? If so, could you please firstly elaborate on what you would do?
I took a stab at it. At the moment it is only implemented for scan_rescue.
Idea is to hold method comments in store and if offenses are found then check if they have been included in the comment preceding the method.
My first ever attempt to submit anything, hopefully it is not completely atrocius :)
Hey @thepanu, thank you for your PR! 💯 💯
Unfortunately I can take a look at this after the weekend, I'm in a lot of stuff currently (just moved continents a month ago).
My first comment would be to make tests for this so when someone else tries to modify your code doesn't brake it!
No rush. As mentioned I did it only for scan_rescue. If you are happy with that, I can then expand to cover the rest as well.
Also, added test as well.
And I notice that I should've included issue number in all of my commits for them tho show here.
#53
The PR #53 was closed some time ago, closing this issue as well.