hugsql 2023-03-18

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

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

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...

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

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️⃣ 1

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.

hope it helps

we'll find a way. thanks