Skip to content

Commit

Permalink
Disable condition-always-true linter for now
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Oct 27, 2023
1 parent 6ed9cf6 commit 8034c65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions doc/linters.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ configuration. For general configurations options, go [here](config.md).
- [Case symbol test constant](#case-symbol-test-constant)
- [Clj-kondo config](#clj-kondo-config)
- [Cond-else](#cond-else)
- [Condition always true](#condition-always-true)
- [Conflicting-alias](#conflicting-alias)
- [Consistent-alias](#consistent-alias)
- [Datalog syntax](#datalog-syntax)
Expand Down Expand Up @@ -239,9 +240,10 @@ enabling this linter, you can prepend the `case` expression with
*Keyword:* `:condition-always-true`.

*Description:* warn on a condition that evaluates to an always truthy constant,
like when passing a function instead of calling it
like when passing a function instead of calling it. This linter intentionally
doesn't check for literally `true` values of vars since this is often a dev/production setting.

*Default level:* `:warning`.
*Default level:* `:off` (will be `:warning` in a future release).

*Example trigger:* `(if odd? :odd :even)`.

Expand Down
2 changes: 1 addition & 1 deletion src/clj_kondo/impl/config.clj
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
:protocol-method-varargs {:level :error}
:unused-alias {:level :off}
:self-requiring-namespace {:level :off}
:condition-always-true {:level :warning}}
:condition-always-true {:level :off}}
;; :hooks {:macroexpand ... :analyze-call ...}
:lint-as {cats.core/->= clojure.core/->
cats.core/->>= clojure.core/->>
Expand Down

0 comments on commit 8034c65

Please sign in to comment.