This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-10
Channels
- # announcements (6)
- # architecture (2)
- # babashka (30)
- # beginners (90)
- # calva (21)
- # cider (22)
- # clj-kondo (27)
- # cljs-dev (7)
- # clojure (132)
- # clojure-europe (51)
- # clojure-nl (12)
- # clojure-norway (3)
- # clojure-spec (3)
- # clojure-uk (5)
- # clojurescript (69)
- # cloverage (9)
- # conjure (5)
- # core-async (54)
- # cursive (14)
- # datomic (34)
- # emacs (7)
- # fulcro (10)
- # graalvm (40)
- # graalvm-mobile (2)
- # gratitude (2)
- # improve-getting-started (1)
- # introduce-yourself (1)
- # jobs-discuss (61)
- # leiningen (5)
- # malli (6)
- # off-topic (59)
- # pathom (11)
- # polylith (38)
- # reagent (3)
- # reitit (3)
- # rewrite-clj (3)
- # shadow-cljs (53)
- # tools-build (35)
- # transit (8)
- # vim (62)
- # web-security (26)
- # xtdb (4)
Tried looking for this is there an easy way to run clj-kondo on a polylith project perhaps doing a glob or something so i can match any file under a /src/ folder or something
@oliver.marks you can use clojure -Spath
to get a classpath in your project and then you could filter out directories that fall within the project maybe?
e.g.:
$ clojure -Spath | bb -e '(->> (str/split (str/trim (slurp *in*)) #":") (filter fs/directory?))'
("src" "shared/src" "resources" "java/target/classes" "/Users/borkdude/Dropbox/dev/clojure/metabase/java/target/classes")
okay I was kind of hoping for a more built in so I can use it in my github action, and not have to add a list of folders
clj-kondo is agnostic of build tooling, it has nothing built in regarding deps.edn, polylith, lein or whatever. just give it the paths to lint and it will lint. You could also just do clj-kondo --lint .
- name: Code Linting
uses: DeLaGuardo/clojure-lint-action@master
with:
clj-kondo-args: --lint workspace
check-name: Linting
github_token: ${{ secrets.GITHUB_TOKEN }}
This is the current step in the actionI guess to do the above i would need a different action to get the list and pass to clj-kondo
yeah that picks up output in resources folders so I get files like this linted
ublic/cljs-out/dev/reagent/impl/template.cljs
the above I am getting locally by the way they are not in the repo on github but its more an example
Unexpected error. Please report an issue.
java.lang.ClassCastException: clojure.lang.Symbol cannot be cast to java.lang.String
at clojure.core$re_pattern.invokeStatic(core.clj:4834)
at clj_kondo.impl.core$filter_findings$iter__16030__16034$fn__16035$fn__16036$fn__16039.invoke(core.clj:524)
at clojure.core$some.invokeStatic(core.clj:2705)
at clojure.core$some.invoke(core.clj:2696)
at clojure.core$comp$fn__5826.invoke(core.clj:2574)
at clj_kondo.impl.core$filter_findings$iter__16030__16034$fn__16035$fn__16036.invoke(core.clj:524)
at clj_kondo.impl.core$filter_findings$iter__16030__16034$fn__16035.invoke(core.clj:511)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
at clojure.lang.LazySeq.seq(LazySeq.java:51)
at clojure.lang.RT.seq(RT.java:535)
at clojure.core$seq__5420.invokeStatic(core.clj:139)
at clojure.core$sort.invokeStatic(core.clj:3101)
at clojure.core$sort_by.invokeStatic(core.clj:3107)
at clojure.core$sort_by.invokeStatic(core.clj:3107)
at clj_kondo.core$run_BANG_.invokeStatic(core.clj:181)
at clj_kondo.main$main.invokeStatic(main.clj:130)
at clj_kondo.main$main.doInvoke(main.clj:126)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:667)
at clj_kondo.main$_main$fn__16234.invoke(main.clj:177)
at clj_kondo.main$_main.invokeStatic(main.clj:177)
at clj_kondo.main$_main.doInvoke(main.clj:175)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clj_kondo.main.main(Unknown Source)
hum that causes an exception 😞