active-group / active-group/active-kondo

Left and right hand side in monadic let is considered unused.

Aperta
#2 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Clojure
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Consider the following example:

```clojure
(ns active-kondo-test.core
(:require [active.clojure.monad :as monad]))

(defn test-f
[arg]
(monad/monadic (let [foo arg])
(monad/return foo)))

(defn -main
[& _]
(println (monad/run-monadic (monad/null-monad-command-config {} {})
(test-f "foo"))))
```

In particular, consider `test-f`. The `arg` parameter as well as the left hand side of the let are obviously used in the expression, yet, `clj-kondo` reports both of them as unused.

```shell
$ clj-kondo --version
clj-kondo v2022.04.23
$ clj-kondo --lint src --config active-kondo/config.edn
src/active_kondo_test/core.clj:5:4: warning: unused binding arg
src/active_kondo_test/core.clj:7:32: error: Unresolved symbol: foo
linting took 130ms, errors: 1, warnings: 1
```

It's possible I'm not calling `clj-kondo` correctly (the `--config` syntax seems to be fine as described [here](https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#introduction)).

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.