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 reference lint-as macros that can be used in lint-as e.g. to support orchestra.core/defn-spec #682

Closed
borkdude opened this issue Jan 1, 2020 · 0 comments

Comments

@borkdude
Copy link
Member

borkdude commented Jan 1, 2020

E.g. to support orchestra.core/defn-spec:

(defn-spec my-inc integer?
  [a integer?] ; Each argument is followed by its spec.
  (+ a 1))

we might support a non-existing imaginary reference macro clj-kondo.lint-as-macros/defn-1 which:

  • knows that a var is being created with a certain name
  • doesn't create warnings for the rest of the body, but does lint usages, so e.g. no warnings will pop up for an unused private function)

This approach might also work for the Rum macros described in #536 .

@borkdude borkdude changed the title Support reference macros that can be used in lint-as e.g. to support orchestra.core/defn-spec Support reference lint-as macros that can be used in lint-as e.g. to support orchestra.core/defn-spec Jan 1, 2020
borkdude added a commit that referenced this issue Jan 10, 2020
borkdude added a commit that referenced this issue Jan 10, 2020
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

1 participant