Skip to content
New issue

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

unused var when linting babashka.process/$ #1368

Closed
bn-darindouglass-zz opened this issue Aug 28, 2021 · 0 comments
Closed

unused var when linting babashka.process/$ #1368

bn-darindouglass-zz opened this issue Aug 28, 2021 · 0 comments
Projects

Comments

@bn-darindouglass-zz
Copy link

version

v2021.08.06

platform

MacOS Catalina, native clj-kondo

editor

Emacs + flycheck

problem

clj-kondo incorrectly flags bindings used in the options map to $ as unused. This manifests several ways:

  • unused bindings
  • unused private vars

side note: the babashka.process repo still has deprecated kondo config for the $ macro

repro

;; foo.clj
(ns foo
  (:require [babashka.process :refer [$] :as p]))

(defn example
  []
  (let [env {"SOME_VAR" "wee"}]
    ;; unused binding env
    (-> ($ {:out :string :env env} echo "hi")
        (p/check)
        (:out)
        (println))))

config

{}

expected behavior

clj-kondo should recognize env as being used.

@borkdude borkdude added this to Needs triage in clj-kondo via automation Aug 28, 2021
@borkdude borkdude moved this from Needs triage to High priority (next release) in clj-kondo Aug 28, 2021
clj-kondo automation moved this from High priority (next release) to Done Aug 30, 2021
borkdude added a commit that referenced this issue Aug 30, 2021
benedekfazekas added a commit to benedekfazekas/clj-kondo that referenced this issue Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
clj-kondo
  
Done
Development

No branches or pull requests

2 participants