Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Bump clj-kondo/clj-kondo from 2025.04.07 to 2025.07.28 (#61771)

github-automation-metabase676c64a2aaf4
diff --git a/deps.edn b/deps.edn
index e36ce743e5a..92b2bc4b1fa 100644
--- a/deps.edn
+++ b/deps.edn
@@ -241,7 +241,7 @@
{cider/cider-nrepl {:mvn/version "0.57.0"} ; nREPL server for CIDER
clj-http-fake/clj-http-fake {:mvn/version "1.0.4"
:exclusions [slingshot/slingshot]}
- clj-kondo/clj-kondo {:mvn/version "2025.04.07"} ; included here mainly to facilitate working on the stuff in `.clj-kondo/src`
+ clj-kondo/clj-kondo {:mvn/version "2025.07.28"} ; included here mainly to facilitate working on the stuff in `.clj-kondo/src`
cloverage/cloverage {:mvn/version "1.2.4"}
com.clojure-goes-fast/clj-async-profiler
{:mvn/version "1.6.2"} ; Enables local profiling and heat map generation
@@ -458,7 +458,7 @@
;; Use this to only run Kondo against specific files.
:kondo
{:replace-deps
- {clj-kondo/clj-kondo {:mvn/version "2025.04.07"}}
+ {clj-kondo/clj-kondo {:mvn/version "2025.07.28"}}
:main-opts
["-m" "clj-kondo.main"]}
diff --git a/enterprise/backend/src/metabase_enterprise/audit_app/query_processor/middleware/handle_audit_queries.clj b/enterprise/backend/src/metabase_enterprise/audit_app/query_processor/middleware/handle_audit_queries.clj
index b090b7912f8..b30f25a1840 100644
--- a/enterprise/backend/src/metabase_enterprise/audit_app/query_processor/middleware/handle_audit_queries.clj
+++ b/enterprise/backend/src/metabase_enterprise/audit_app/query_processor/middleware/handle_audit_queries.clj
@@ -88,7 +88,7 @@
{:error/message "namespace-qualified symbol serialized as a string"}
(fn [s]
(try
- (when-let [symb (symbol s)]
+ (when-let [symb (some-> s symbol)]
(qualified-symbol? symb))
(catch Throwable _)))]]]
[:args {:optional true} [:sequential :any]]])
diff --git a/enterprise/backend/src/metabase_enterprise/sandbox/models/group_table_access_policy.clj b/enterprise/backend/src/metabase_enterprise/sandbox/models/group_table_access_policy.clj
index ddff360d34b..b5fc1411275 100644
--- a/enterprise/backend/src/metabase_enterprise/sandbox/models/group_table_access_policy.clj
+++ b/enterprise/backend/src/metabase_enterprise/sandbox/models/group_table_access_policy.clj
@@ -77,9 +77,9 @@
(let [db-path (concat [group-id db-id] perm-location)
db-perm (get-in graph db-path)
schema-perm (get db-perm schema)
- default-table-perm (if (keyword? db-perm)
- db-perm
- (when (keyword schema-perm) schema-perm))
+ default-table-perm (cond
+ (keyword? db-perm) db-perm
+ (keyword? schema-perm) schema-perm)
;; If perms were set at the database or schema-level before, we might need to add granular values for all tables
;; in the database or schema, so they show correctly in the UI.
tables (when (or (keyword? db-perm) (keyword? schema-perm))
diff --git a/enterprise/backend/src/metabase_enterprise/scim/v2/api.clj b/enterprise/backend/src/metabase_enterprise/scim/v2/api.clj
index 26b751fcceb..44387cd775c 100644
--- a/enterprise/backend/src/metabase_enterprise/scim/v2/api.clj
+++ b/enterprise/backend/src/metabase_enterprise/scim/v2/api.clj
@@ -409,9 +409,9 @@
any existing members."
[group-id user-entity-ids]
(let [user-ids (t2/select-fn-set :id :model/User {:where [:in :entity_id user-entity-ids]})]
- (when-let [memberships (map
- (fn [user-id] {:group group-id :user user-id})
- user-ids)]
+ (when-let [memberships (not-empty (map
+ (fn [user-id] {:group group-id :user user-id})
+ user-ids))]
(t2/delete! :model/PermissionsGroupMembership :group_id group-id)
(perms/add-users-to-groups! memberships))))
diff --git a/src/metabase/app_db/update_h2.clj b/src/metabase/app_db/update_h2.clj
index 2bbcb284d8b..a0cf7382631 100644
--- a/src/metabase/app_db/update_h2.clj
+++ b/src/metabase/app_db/update_h2.clj
@@ -40,7 +40,8 @@
[jdbc-url]
;; The H2 database version is indicated in the "format:" key of the MV file header, which is 4096 bytes
;; See: https://www.h2database.com/html/mvstore.html
- (when-let [path (str (h2-base-path jdbc-url) ".mv.db")]
+ (when-let [path (some-> (h2-base-path jdbc-url)
+ (str ".mv.db"))]
(when (.exists (io/file path))
(let [header (str/join (map try-char (head path 4096)))
format-key "format:"]
diff --git a/src/metabase/lib/util.cljc b/src/metabase/lib/util.cljc
index 43599be650c..b5c1b3ce88f 100644
--- a/src/metabase/lib/util.cljc
+++ b/src/metabase/lib/util.cljc
@@ -704,8 +704,9 @@
"Get the `:lib/type` or `:type` from `query`, even if it is not-yet normalized."
[query :- [:maybe :map]]
(when (map? query)
- (when-let [query-type (keyword (some #(get query %)
- [:lib/type :type "lib/type" "type"]))]
+ (when-let [query-type (some-> (some #(get query %)
+ [:lib/type :type "lib/type" "type"])
+ keyword)]
(when (#{:mbql/query :query :native :internal} query-type)
query-type))))
diff --git a/src/metabase/queries/api/card.clj b/src/metabase/queries/api/card.clj
index 756eae58059..cc0f70e0a6b 100644
--- a/src/metabase/queries/api/card.clj
+++ b/src/metabase/queries/api/card.clj
@@ -263,7 +263,7 @@
(defn- card-columns-from-names
[card names]
- (when-let [names (set names)]
+ (when-let [names (not-empty (set names))]
(filter #(names (:name %)) (:result_metadata card))))
(defn- cols->kebab-case
diff --git a/src/metabase/warehouse_schema/api/field.clj b/src/metabase/warehouse_schema/api/field.clj
index 8fa4b4e83cf..df6b8f3324c 100644
--- a/src/metabase/warehouse_schema/api/field.clj
+++ b/src/metabase/warehouse_schema/api/field.clj
@@ -128,7 +128,7 @@
[(:base_type field) nil]
:else
- (when-let [coercion-strategy (keyword coercion-strategy)]
+ (when-let [coercion-strategy (some-> coercion-strategy keyword)]
(let [effective (types/effective-type-for-coercion coercion-strategy)]
(if (types/is-coercible? coercion-strategy (:base_type field) effective)
[effective coercion-strategy]
diff --git a/src/metabase/warehouse_schema/models/field.clj b/src/metabase/warehouse_schema/models/field.clj
index 856648cb4ac..164cbff74e4 100644
--- a/src/metabase/warehouse_schema/models/field.clj
+++ b/src/metabase/warehouse_schema/models/field.clj
@@ -43,7 +43,7 @@
(defn- hierarchy-keyword-in [column-name & {:keys [ancestor-types]}]
(fn [k]
- (when-let [k (keyword k)]
+ (when-let [k (some-> k keyword)]
(when-not (some
(partial isa? k)
ancestor-types)
diff --git a/test/metabase/driver/impl_test.clj b/test/metabase/driver/impl_test.clj
index 8e814efe486..8c8993698e1 100644
--- a/test/metabase/driver/impl_test.clj
+++ b/test/metabase/driver/impl_test.clj
@@ -90,7 +90,7 @@
(defn- older-than-42?
[version]
- (when-let [version (drop 1 (re-find #"(\d+)\.(\d+)\.(\d+)" (str version)))]
+ (when-let [version (not-empty (drop 1 (re-find #"(\d+)\.(\d+)\.(\d+)" (str version))))]
(< (compare (mapv #(Integer/parseInt %) version)
[0 42 0])
0)))
diff --git a/test/metabase/driver/sql_jdbc/connection_test.clj b/test/metabase/driver/sql_jdbc/connection_test.clj
index 37202983247..57ef2dce029 100644
--- a/test/metabase/driver/sql_jdbc/connection_test.clj
+++ b/test/metabase/driver/sql_jdbc/connection_test.clj
@@ -119,18 +119,18 @@
:databricks
(assoc details :log-level 0)
- (cond-> details
+ (cond
;; swap localhost and 127.0.0.1
(and (string? (:host details))
(str/includes? (:host details) "localhost"))
- (update :host str/replace "localhost" "127.0.0.1")
+ (update details :host str/replace "localhost" "127.0.0.1")
(and (string? (:host details))
(str/includes? (:host details) "127.0.0.1"))
- (update :host str/replace "127.0.0.1" "localhost")
+ (update details :host str/replace "127.0.0.1" "localhost")
:else
- (assoc :new-config "something"))))))
+ (assoc details :new-config "something"))))))
(deftest connection-pool-invalidated-on-details-change
(mt/test-drivers (mt/driver-select {:+parent :sql-jdbc})
diff --git a/test/metabase/lib/util/match_test.cljc b/test/metabase/lib/util/match_test.cljc
index 07b3a221c20..d34eea4bb57 100644
--- a/test/metabase/lib/util/match_test.cljc
+++ b/test/metabase/lib/util/match_test.cljc
@@ -93,7 +93,7 @@
(let [some-pred? (constantly true)]
(lib.util.match/match another-query
:field
- (when some-pred?
+ (when (some-pred? &match)
&match)))))))
(t/deftest ^:parallel match-&parents-test