active-group / active-group/active-kondo

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

Ouverte
#2 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Clojure
Étoiles
0
Forks
0
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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)).

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.