This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-18
Channels
- # announcements (7)
- # babashka (4)
- # babashka-sci-dev (73)
- # beginners (101)
- # biff (4)
- # calva (33)
- # clerk (36)
- # clj-commons (23)
- # clj-kondo (3)
- # clojure (38)
- # clojure-europe (2)
- # clojurescript (29)
- # datalevin (15)
- # emacs (2)
- # fulcro (8)
- # gratitude (1)
- # hugsql (9)
- # hyperfiddle (43)
- # jobs-discuss (4)
- # lsp (47)
- # malli (7)
- # off-topic (14)
- # pathom (5)
- # practicalli (1)
- # releases (7)
- # shadow-cljs (4)
- # spacemacs (6)
- # sql (7)
- # tools-deps (7)
- # transit (8)
- # xtdb (6)
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
@U067EQZL4 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?
There is a popular stackoverflow question about this: https://stackoverflow.com/questions/61727582/how-to-avoid-unresolved-symbol-with-clj-kond-when-using-hugsql-def-db-fns-macro
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