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 bindings #173
Comments
@mynomoto A very preliminary version of unused bindings is supported in this linux binary (EDIT: link moved to opening comment) |
Sure, will do and report. |
Found one false positive
Reports: |
Changing |
@mynomoto Please ensure you're using the latest binary linked in the top comment. I believe I've already fixed this in the last few hours :-). |
I just finished linting a project from work and no more false positives after the upgrade. Thanks! |
I would love for this to cover cats.core/mlet (it works just like a let) but I'm not sure if you intend to or not in this first version. I wonder if that could be configurable for well behaved forms. |
@mynomoto That should work when using |
Fixed with 6d9020a |
Cool, I will try that! Thanks! |
Found a false positive related to metadata: (defn false-positive-metadata
[a b]
^{:key (str a b)} [:other]) cljkondo.clj:2:4: warning: unused binding a |
Good catch! I'll look into it. |
@mynomoto Fixed in https://3192-176829714-gh.circle-artifacts.com/0/release/clj-kondo-2019.05.27-alpha-SNAPSHOT-linux-amd64.zip |
The false positive fix worked, as the |
I think I'm getting a false positive on my CLJS code. I'm using a default import ( Other than that no surprises :) |
Report unused bindings
TODO:
(fn [_] "foo")
(fn [{:keys [x] :or {x 1}}] x)
(let [{:keys [patient/id order/id]} {}] id)
(both are unused, while in reality only one is unused)loop
,if-let
,when-let
for
,doseq
,with-open
:let
,:when
and:while
infor
anddoseq
Linux binary: https://3192-176829714-gh.circle-artifacts.com/0/release/clj-kondo-2019.05.27-alpha-SNAPSHOT-linux-amd64.zip
Mac binary: https://3194-176829714-gh.circle-artifacts.com/0/release/clj-kondo-2019.05.27-alpha-SNAPSHOT-macos-amd64.zip
The text was updated successfully, but these errors were encountered: