clj-kondo

https://github.com/clj-kondo/clj-kondo
snoe 2021-03-25T03:48:30.138500Z

thanks hopefully the pr is close

snoe 2021-03-25T03:49:15.138700Z

i looked at the code for unused-namespace and it doesn't seem like it's deduping, but I could have missed something.

snoe 2021-03-25T03:49:30.138900Z

Two more questions: would it be possible to add #_ handling to skip-comments or, rather, where should I add similar behaviour? This is biting me all the time, when I have temporarily ignored code and try to get the signature of a function and come up empty because there's no analysis for the form.

snoe 2021-03-25T03:53:35.142500Z

For keyword def analysis (and I admit I might be too late to this convo) in the old version of lsp, it was nice to mark a re-frame keyword as a definition and get the signature of the associated function. So (rf/reg-sub ::foobar (fn [db [_ foobar]] ...)) would allow you to hover on ::foobar elsewhere in the code and see the [db [_ foobar]] signature. I've been missing this more and more lately, and it would be nice if analysis could provide it.

borkdude 2021-03-25T12:55:58.144Z

@snoe question 1: not sure what you mean, sorry. Can you post the idea here? https://github.com/clj-kondo/clj-kondo/discussions/categories/ideas with more explanation? It's easier for me to track than Slack discussions when it's a longer idea question 2: I think we should just add built-in support for re-frame to get the right definition, since it's such a common library

snoe 2021-03-25T15:02:51.144300Z

1. will do. 2. there are other libraries like kee-frame that would need similar. So re-frame makes sense to be build in but there's probably needs to be more to the hooks api and a place to add signatures to keyword analysis.

borkdude 2021-03-25T15:34:15.144500Z

@snoe don't we already have this function, reg-keyword-def or something?

snoe 2021-03-25T15:35:57.144700Z

yup, but no way to associate a signature

borkdude 2021-03-25T15:37:44.144900Z

Can you make a separate discussion for this on Github at https://github.com/clj-kondo/clj-kondo/discussions/categories/ideas?

👍 1