-
Notifications
You must be signed in to change notification settings - Fork 74
Description
I think it would be a great enhancement if I was able to disable/exclude a speed suggestion for a specific line via a magic comment (much like how Rubocop does single-instance cop-disablement; # rubocop:disable Metrics/LineLength).
There are times where a single speedup in a given line of code is not applicable and I want to disable the speedup for the line but I don't want to have to add the entire file to the exclude_paths block of .fasterer.yml.
For example, if I have instance whereby I've used Hash#keys.each two times in a single file and one of those two times the hash is modified during the .each block (but the other time, the hash is not modified during the .each block) then I would want fasterer to ignore that singular instance of Hash#keys.each where the hash is modified (while still letting fasterer analyze the other instance of Hash#keys.each where the hash is not modified).
Hopefully this makes sense and seems reasonable!
Thanks for all the work put into fasterer over the years; it has certainly made some of my code... well... fasterer. π