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

False positive in lint/assoc-fn when using a macro #15

Closed
skynet-gh opened this issue May 2, 2024 · 1 comment
Closed

False positive in lint/assoc-fn when using a macro #15

skynet-gh opened this issue May 2, 2024 · 1 comment

Comments

@skynet-gh
Copy link

Given splint/bug.clj:

(ns splint.bug)

(let [x {}
      y 1]
  (assoc x :a (or (:a x) y)))

splint suggests:

$ clj -M:splint splint/bug.clj
splint/bug.clj:6:3 [lint/assoc-fn] - Use `update` instead of recreating it.
(assoc x :a (or (:a x) y))
Consider using:
(update x :a or y)

Linting took 62ms, checked 1 files, 1 style warnings

but this is a syntax error: Can't take value of a macro: #'clojure.core/or

@NoahTheDuke
Copy link
Owner

Fixed in release 1.15.1. Thanks for letting me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants