-
Notifications
You must be signed in to change notification settings - Fork 67
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
Option to accept specific unqualified symbols? #50
Comments
This should be relatively easy to implement, but I am not sure this is a good idea. I don't find having to |
Yeah, I hear you, and I agree, and tend to avoid
That's the thing... I have tons of those. I use Without this option, I have to tolerate the false-positive linter errors (ugh), or not use it :( , or change hundreds of |
OK, this is not my cup of tee, but it does look like a legitimate use case. I've implemented a feature that should help with this and other similar issues and make the linter more customizable. Joker will now execute the following files (if they exist) before linting your file: To make Joker aware of Specter definitions, you can put something like this in
You don't need (or want) to provide the bodies, just the names and args lists.
It'd be great if you could try this out and let me know how it works in practice. |
Great! I would love to try it. I wasn't able to get it to compile with |
tj/node-prune#13 looks like maybe I need |
I build with 1.9 locally, have not tried previous versions. I can build a binary for you if it's easier. Don't want to do a release just yet. |
It works with 1.10 |
Cool!
See this test for full example. |
Aha, I noticed that it wasn't linting the symbols passed to This is fantastic, it's much better than the simple thing I had in mind! The only thing that did not work for me just now is putting this in
It works as expected if I put that in a parent directory of the file being linted. |
Ah, perhaps this is because I have a |
Correct, it uses the first one found and doesn't merge configs. |
mention `(in-ns 'joker.core)` and link to candid82#50
mention `(in-ns 'joker.core)` and link to candid82#50
mention `(in-ns 'joker.core)` and link to candid82#50
mention `(in-ns 'joker.core)` and link to candid82#50
I understand that
joker
doesn't try to resolve symbols from external namespaces, and it does show an error if I use a symbol that was referred with a:refer :all
in therequire
form.I do not use
:refer :all
much, but there are a few cases (likecom.rpl.specter
) where I make an exception, and I would be fine with configuringjoker
to know about those few exceptions.Would it be easy to add an option I could put in the
.joker
config file:known-unqualified-syms [ALL collect collect-one MAP-KEYS ... ]
and then not get false positives fromjoker
when using those symbols unqualified? (or, is there another way to silence these warnings that I missed?)If someone can point me in the right direction, I might be able to do it myself. I just discovered
joker
today (and it's awesome! 🚀 ).The text was updated successfully, but these errors were encountered: