Fork me on GitHub
#clj-kondo
<
2022-05-17
>
chrisetheridge11:05:52

is it possible to slurp a file inside a hook?

borkdude11:05:25

@biscuitpants No, but it is possible to use require

chrisetheridge11:05:21

thank you @borkdude! i'm trying to slurp an edn file when running a hook, but i think i can use analysis to work around this

borkdude11:05:50

I guess we could allow slurp, it doesn't seem to be a dangerous operation in clj-kondo hooks. The only problem is that it would be working-directory sensitive

borkdude11:05:03

and clj-kondo isn't always invoked from the same directory by different tools

chrisetheridge11:05:21

i think i can work around the limitation though

borkdude11:05:59

which limitation: slurp not being there, or the directory problem?

chrisetheridge11:05:03

slurp

๐Ÿ‘ 1
chrisetheridge11:05:17

thank you for the help

imre11:05:25

this sounds like something to support hugsql ๐Ÿ™‚

lread12:05:57

@borkdude am I right in that https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#importing? I think I noticed we don't need to specify import configs in :config-paths anymore. Can do a little doc PR if the above is true.

borkdude12:05:43

yeah config-paths isn't necessary anymore when importing, if the library conforms the the suggested structure

borkdude12:05:01

we should also get rid of the printed suggestion after importing

๐Ÿ‘ 1