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

Incorrect squiggle with macro quotes #2564

Open
rongcuid opened this issue Jun 6, 2024 · 2 comments
Open

Incorrect squiggle with macro quotes #2564

rongcuid opened this issue Jun 6, 2024 · 2 comments

Comments

@rongcuid
Copy link

rongcuid commented Jun 6, 2024

The following is valid Clojure:

(defmacro foo [xs]
  (list println `'~xs))
(foo (a b))

However, the error squiggle is incorrect:
Screenshot from 2024-06-06 12-01-01

@PEZ
Copy link
Collaborator

PEZ commented Jun 21, 2024

Hi! Thanks for reporting. This is better brought up with clj-kondo:

$ clj-kondo --lint - << 'EOF'
(defmacro foo [xs]
  (list println `'~xs))
(foo (a b))
EOF
<stdin>:3:9: error: Unresolved symbol: a
<stdin>:3:11: error: Unresolved symbol: b
linting took 33ms, errors: 2, warnings: 0

Maybe @borkdude can tell us wether he wants an issue there or if there is some reason why the default lint rules do this.

@borkdude
Copy link

Do you mean you consider it a bug that a and b are unresolved symbols?

You need to configure clj-kondo for your custom macros. You can read more about that here: https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#unrecognized-macros

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

No branches or pull requests

3 participants