This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-06
Channels
- # aws (1)
- # beginners (7)
- # calva (2)
- # chlorine-clover (4)
- # cider (4)
- # clj-kondo (20)
- # clojure (43)
- # clojure-losangeles (1)
- # clojure-norway (24)
- # clojurescript (4)
- # community-development (2)
- # hyperfiddle (27)
- # kaocha (2)
- # lsp (17)
- # malli (1)
- # pedestal (1)
- # portal (8)
- # practicalli (5)
- # reagent (22)
- # releases (1)
- # shadow-cljs (1)
- # squint (1)
Hey, Is there a way to restrict the linting language at the level of a single namespace? E.g. I have a CLJC namespace for Clojure JVM + Babashka which I don't want to be linted as CLJS
currently not supported, but you can maybe rename the file to .clj
and use the if-bb
macro:
(defmacro if-bb [then else]
(if (System/getProperty "babashka.version")
then else))
(defn foobar [x]
(if-bb (inc x) (dec x)))
Hello! May I add something to config for excluding files & folders in project from linting? I tried :exclude-files
and :paths-ignore-regex
in a lot of ways but without success. Also can't find any example of it in all the internet 🙂
What is :paths-ignore-regex
? It might be a clojure-lsp thing but it's not a clj-kondo thing
https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#exclude-files-from-being-linted
Your last link doesn't show which level of config should I put it - and above you show :output
level
yeah both are valid but without output the file isn't linted at all, and with output only the output is suppressed
I have .sandbox
folder in project, and want to exclude all these files from linting. All the tried doesn't work
{:lint-as {reagent.core/with-let clojure.core/let}
:linters {:unresolved-symbol {:exclude [devdb devconn devsystem match?]}}
;; :exclude-files ".sandbox/handler.clj"
;; :exclude-files ".sandbox/handler.clj$"
;; :exclude-files ".sandbox/*.clj$"
:output {:exclude-files ".sandbox"}}
[{ "resource": "/home/ivana/work/yoobeedoobics/yoobeedoobics-web/.sandbox/handler.clj", "owner": "generateddiagnostic_collection_name_#0", "severity": 8, "message": "Namespace name does not match file name: yoobeedoobics-web.handler", "source": "clj-kondo", "startLineNumber": 1, "startColumn": 5, "endLineNumber": 1, "endColumn": 30 },{ "resource": "/home/ivana/work/yoobeedoobics/yoobeedoobics-web/.sandbox/handler.clj", "owner": "generateddiagnostic_collection_name_#0", "severity": 8, "message": "Unresolved symbol: zz", "source": "clj-kondo", "startLineNumber": 12, "startColumn": 1, "endLineNumber": 12, "endColumn": 3 },{ "resource": "/home/ivana/work/yoobeedoobics/yoobeedoobics-web/.sandbox/handler.clj", "owner": "generateddiagnostic_collection_name_#0", "severity": 4, "message": "#'compojure.core/DELETE is referred but never used", "source": "clj-kondo", "startLineNumber": 2, "startColumn": 46, "endLineNumber": 2, "endColumn": 52 },{ "resource": "/home/ivana/work/yoobeedoobics/yoobeedoobics-web/.sandbox/handler.clj", "owner": "generateddiagnostic_collection_name_#0", "severity": 4, "message": "#'compojure.core/OPTIONS is referred but never used", "source": "clj-kondo", "startLineNumber": 2, "startColumn": 53, "endLineNumber": 2, "endColumn": 60 },{ "resource": "/home/ivana/work/yoobeedoobics/yoobeedoobics-web/.sandbox/handler.clj", "owner": "generateddiagnostic_collection_name_#0", "severity": 4, "message": "#'compojure.core/ANY is referred but never used", "source": "clj-kondo", "startLineNumber": 2, "startColumn": 61, "endLineNumber": 2, "endColumn": 64 },{ "resource": "/home/ivana/work/yoobeedoobics/yoobeedoobics-web/.sandbox/handler.clj", "owner": "generateddiagnostic_collection_name_#0", "severity": 4, "message": "unused binding e", "source": "clj-kondo", "startLineNumber": 171, "startColumn": 56, "endLineNumber": 171, "endColumn": 57 }]