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
Projects

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.

@borkdude borkdude self-assigned this Sep 26, 2020
@borkdude borkdude added the enhancement New feature or request label Sep 26, 2020
@borkdude borkdude added this to Needs triage in clj-kondo via automation Sep 26, 2020
@borkdude borkdude moved this from Needs triage to High priority (next release) in clj-kondo Sep 26, 2020
@borkdude borkdude moved this from High priority (next release) to In progress in clj-kondo Oct 4, 2020
borkdude added a commit that referenced this issue Oct 4, 2020
@borkdude borkdude moved this from In progress to Next release in clj-kondo Oct 4, 2020
clj-kondo automation moved this from Next release to Done Oct 10, 2020
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
clj-kondo
  
Done
Development

No branches or pull requests

2 participants