Fork me on GitHub
#hugsql
<
2023-03-18
>
shem10:03:16

https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#unrecognized-macros I noticed this new clj-kondo feature. I wonder if there's plans to add this metadata to hugsql macros? in one of our sql-heavy projects it would cut down linter noise considerably

borkdude10:03:42

@U067EQZL4 can you give an example of such a macro?

shem10:03:42

Err...I was thinking of def-db-fns, which in the version of hugsql we are using is a macro but it seems in the current version is a function...

shem10:03:59

maybe just upgrading hugsql helps for "unresolved symbol" linter errors for the functions introduced by def-db-fns?

borkdude10:03:46

So: 0) use declare to "help" clj-kondo 1) or isolate your hugsql generated vars in a separate namespace 2) use {:linters {:unresolved-var {:exclude [your-hug-sql-functions-ns]}}} if necessary

0️⃣ 2
shem10:03:13

that's right, I wasn't thinking straight about this. it's not def-db-fns that is the problem but the functions it introduces.

borkdude10:03:02

hope it helps

shem10:03:03

we'll find a way. thanks