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
Most formatting tools provide a way to disable formatting on some expression. For instance various Java and Python tools allow comments at end of line such as # nofmt or # lint: ignore in which case no changes will be made to those lines.
That particular implementation doesn't map well to Clojure, since it's a form oriented language but one could certainly imagine situations where a user really truly thinks they know better than the formatter and wants to disable it for small blocks of code.
I propose that selecting (either by form metadata or a leading/trailing comment) a form to ignore would be the best implementation of this, since it provides the behavior we want (local opt-out) while making it difficult to just tell the linter to go away altogether. The default after all should be code which conforms to the style guide / linter output.
The text was updated successfully, but these errors were encountered:
Most formatting tools provide a way to disable formatting on some expression. For instance various Java and Python tools allow comments at end of line such as
# nofmt
or# lint: ignore
in which case no changes will be made to those lines.That particular implementation doesn't map well to Clojure, since it's a form oriented language but one could certainly imagine situations where a user really truly thinks they know better than the formatter and wants to disable it for small blocks of code.
I propose that selecting (either by form metadata or a leading/trailing comment) a form to ignore would be the best implementation of this, since it provides the behavior we want (local opt-out) while making it difficult to just tell the linter to go away altogether. The default after all should be code which conforms to the style guide / linter output.
The text was updated successfully, but these errors were encountered: