This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-18
Channels
- # announcements (17)
- # babashka (109)
- # beginners (212)
- # calva (1)
- # chlorine-clover (7)
- # cider (8)
- # clj-kondo (31)
- # cljsrn (2)
- # clojure (33)
- # clojure-dusseldorf (1)
- # clojure-finland (2)
- # clojure-france (22)
- # clojure-germany (1)
- # clojure-losangeles (1)
- # clojure-spec (6)
- # clojure-uk (19)
- # clojurescript (31)
- # conjure (41)
- # cryogen (1)
- # data-science (11)
- # datomic (6)
- # emacs (5)
- # exercism (8)
- # figwheel-main (2)
- # fulcro (57)
- # graalvm (15)
- # hoplon (15)
- # jobs-discuss (32)
- # kaocha (7)
- # off-topic (14)
- # pathom (2)
- # planck (9)
- # quil (1)
- # rum (5)
- # shadow-cljs (34)
- # spacemacs (33)
- # tools-deps (1)
- # xtdb (9)
I'm seeing some odd behavior with a :lint-as
rule. In my config, I have {:lint-as {com.fulcrologic.fulcro.components/defsc clojure.core/defn}}
. Oddly enough, I get an unused namespace warning for df
with the form
(defn Home [_this _]
{:lifecycle-method (df/load! "foo")}
(dom/div {} "Home"))
but not with
(defsc Home [_this _]
{:lifecycle-method (df/load! "foo")}
(dom/div {} "Home"))
Interestingly, I uncovered this because I was getting an unused namespace warning for df
with
(defsc Home [_this _]
{:query []
:ident nil
:initial-state nil
:route-segment []
:will-enter (fn [app _]
(df/load! app [:component/id :created-gift-lists]
ui.gift-list/CreatedGiftLists))}
(dom/div {} "Home"))
However, this warning goes away if I delete any of the keys from the component options map (other than :will-enter
of course).@codonnell Maybe it's because clj-kondo tries to parse the first map in defn as a pre-post map
Ah, that's a good thought.
Happy to make a github issue if that would be helpful
Sure thing, thanks for all the work you've put into clj-kondo! 🙂
having trouble getting kondo to work I installed with homebrew and ~/.lein/profiles.clj
looks like
{:user
{:dependencies [[clj-kondo "RELEASE"]]
:aliases {"clj-kondo" ["run" "-m" "clj-kondo.main"]}}}
lein clj-kondo --lint src
works and returns errors in command line, but there is no linting going on in my editor.@dgonsalves22 I don't recommend running clj-kondo with leiningen for editor integration. Installing the binary is a much faster and better experience
@dgonsalves22 If you installed it with brew, and it's on your path, then you're set. But it depends on your editor if you enable the right plugin, etc. What editor are you using?
@dgonsalves22 check this out: https://github.com/borkdude/clj-kondo/blob/master/doc/editor-integration.md#spacemacs
Hi! I'm trying to disable a particular checker for some source files (my tests touch private vars and that's intentional/OK), and I figured a separate config file would work. It seems to work locally on my machine, but DeLaGuardo/clojure-lint-action@v1 appears to be ignoring the command line option: https://github.com/latacora/wernicke/runs/598161720?check_suite_focus=true
Maybe ask @U04V4KLKC if he can support additional command line args. Or roll your own thing. See https://github.com/borkdude/clj-kondo/blob/master/doc/ci-integration.md#linter-output-integration
Hi) cli args should work as expected. I'll check this tomorrow
@lvh please check DeLaGuardo/clojure-lint-action@master
I changed how the options passed to runner internally. Now it should respect your configuration
fyi there appears to be a typo here: https://github.com/DeLaGuardo/clojure-lint-action/blob/dbba6c8a6c492b664882be853fe132a62ac6cfe5/action.yml#L14
I considered trying a YAML vector of args instead of a single string but if that was the issue, --lint src
working wouldn't make sense either
(base) lvh@cannon ~/s/L/wernicke $ clj-kondo --lint test
test/latacora/wernicke/cli_test.clj:24:18: error: #'latacora.wernicke.cli/exit! is private
linting took 29ms, errors: 1, warnings: 0
(base) lvh@cannon ~/s/L/wernicke $ clj-kondo --config .clj-kondo/test-config.edn --lint test
linting took 33ms, errors: 0, warnings: 0
@borkdude just to follow up. My previous issues were definitely spacemacs related and not kondo related. Thought you would like to know.