Fork me on GitHub
#clj-kondo
<
2023-03-27
>
Jacob Taylor-Hindle09:03:15

Hey all 👋 Is there any way I can warn against the usage of specific tagged literals (e.g. #inst)? I imagine I have to create a custom lint but wanted to check to make sure I'm not missing anything.

borkdude09:03:39

@U04SBRBM4CF currently there is :config-in-tag but I'm not sure how this lets you warn on the usage of that tag :)

borkdude09:03:00

:config-in-tag {inst {...}}

borkdude09:03:11

maybe we need a new issue for this

Jacob Taylor-Hindle09:03:51

Thanks! I'll take a look 🙂

borkdude09:03:26

:discouraged-tag would make sense, since we have it for -var and -namespace

👍 2
borkdude11:03:07

If anyone wants to have a go at the PR for this: it's pretty straightforward since it's similar to existing linters.

Jacob Taylor-Hindle12:03:30

I'm happy to take a look! Are there any PRs you can recommend I use as a reference?

borkdude12:03:02

Yes, the implementation of :discouraged-var etc

borkdude12:03:11

just use search on github and look at the code

👍 2
Jacob Taylor-Hindle16:03:16

Had a first go at it, though it's not fully working yet - https://github.com/clj-kondo/clj-kondo/pull/2031

borkdude16:03:10

Cool! I think it make sense to do the check at the same spot where we handle :config-in-tag - this should catch all occurrences

Jason Whitlark16:03:27

Wrong “@Ja” 😆

Jacob Taylor-Hindle14:03:54

Thanks for the quick turnaround @U04V15CAJ 🙂

borkdude14:03:29

@U04SBRBM4CF you too!

💫 2