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

Support quote in require #1019

Closed
sogaiu opened this issue Sep 26, 2020 · 0 comments
Closed

Support quote in require #1019

sogaiu opened this issue Sep 26, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@sogaiu
Copy link
Contributor

sogaiu commented Sep 26, 2020

Is your feature request related to a problem? Please describe.
Currently it doesn't appear possible to inform clj-kondo about the introduction of multiple namespaces / aliases via the hooks api. Related #1018

Describe the solution you'd like
Support for quote in require forms is one of two things which if implemented would make it possible to teach clj-kondo via the hooks api, about the introduction of multiple namespaces / aliases via a single form.

Currently, this doesn't get recognized:

(require (quote nice-namespace))

whereas, the following does:

(require 'nice-namespace)

Describe alternatives you've considered
Having the hooks api support the creation of rewrite-clj's quote nodes: https://github.com/borkdude/clj-kondo/blob/master/parser/clj_kondo/impl/rewrite_clj/node/quote.clj#L39
I have no idea how much work that would be nor what consequences it might have.

Additional context
There is a construct in libpython-clj called import-python which when evaluated leads to the introduction of 7 or so namespaces / aliases.

It seems that without support for quote in require forms, clj-kondo cannot be appropriately instructed.

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

No branches or pull requests

2 participants