We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
!
A defn that is not suffixed in ! but which body contains a defn/macro call which is suffixed with ! is "inconsistent":
defn
(defn foo [] ;; inconsistent: should be named `foo!` (swap! bar inc))
This gives the impression that foo is pure, while it is not.
foo
The overall result is that the whole ! convention becomes weaker and less useful.
Create a linter which analyzes all top-level defns/etc, detecting these inconsistencies.
Use the bang! only for things not safe in an STM transaction.
The text was updated successfully, but these errors were encountered:
Tried here clj-kondo/clj-kondo#751 proved tricky
Sorry, something went wrong.
No branches or pull requests
Context
A
defn
that is not suffixed in!
but which body contains a defn/macro call which is suffixed with!
is "inconsistent":This gives the impression that
foo
is pure, while it is not.The overall result is that the whole
!
convention becomes weaker and less useful.Task
Create a linter which analyzes all top-level defns/etc, detecting these inconsistencies.
Considerations
!
s everywhereAdditional resources
The text was updated successfully, but these errors were encountered: