Targeted suggestion suppression
Nessuno ha ancora preso questa issue.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Sometimes a suggestion from Resyntax makes sense generally, but is unhelpful in a specific context. See this comment for an example. Currently, this situation requires users to repeatedly ignore Autofixer pull requests that try to fix the issue they don't care about. Usually in this situation I prefer to just get rid of the suggestion entirely, or otherwise rework it so that it only targets the high-value cases. I don't see a way to do that with the linked issue, since it's very dependent on the surrounding context.
As a last resort, Resyntax may need to provide a way to handle these sorts of issues. I can think of a few approaches:
- Make the autofixer somehow magically "just know" that a suggestion shouldn't be made because it's been made before and was disregarded.
- Add a way to annotate code that suppresses refactoring rules for that code alone, e.g.
(resyntax-suppress zero-comparison-to-positive? (some-code ...)). - Add a way to annotate packages or collections to suppress refactoring rules for that entire package or collection, e.g. in an
info.rktfile. - Add a way for refactoring rules to inspect their surrounding context, so that the
zero-comparison-to-positive?rule can see that a>or<form is being used alongside a=form like in the example from the comment above. Then that rule could silence itself in cases where it would break "visual symmetry".
- Lingua principale
- Racket
- Stelle
- 70
- Fork
- 11
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di jackfirth/resyntax
-
Grimoire docs need examples Apertadocumentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
documentation
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
testing
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
testing
Difficoltà 3/5 1-2 giorni Idoneità per principianti 75/100
-
testing
Difficoltà 4/5 3-5 giorni Idoneità per principianti 68/100