You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. 😄
The text was updated successfully, but these errors were encountered:
Hi @ChefAustin! Thanks for the suggestion, I see it is well accepted by looking at the number of upvotes. Do you potentially have the bandwidth to try to do a proof of concept how it would work?
I very much wish I currently had the free time to do a PoC on this feature. I am hoping that in the coming months I might be able to get around to poking at it.
When I do eventually have the time, I'll need to first do a deep-dive into the mechanics of fasterer and see how it works (because, tbh, right now its a bit of a blackbox of awesome magic to me).
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 thespeedup
for the line but I don't want to have to add the entire file to theexclude_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 wantfasterer
to ignore that singular instance ofHash#keys.each
where the hash is modified (while still lettingfasterer
analyze the other instance ofHash#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
. 😄The text was updated successfully, but these errors were encountered: