[kondo] Squelch missing-docstring linter for Potemkin-imported vars (#82812)
This commit is contained in:
committed by
GitHub
parent
812e9b2254
commit
81736f712a
@@ -854,7 +854,13 @@
|
||||
metabase.users.models.user-test/with-groups! macros.metabase.users.models.user-test/with-groups!
|
||||
metabase.util.namespaces/import-fn macros.metabase.util.namespaces/import-fn
|
||||
metabase.util.namespaces/import-macro macros.metabase.util.namespaces/import-macro
|
||||
metabase.xrays.related-test/with-world macros.metabase.xrays.related-test/with-world}}
|
||||
metabase.xrays.related-test/with-world macros.metabase.xrays.related-test/with-world
|
||||
potemkin/import-def macros.potemkin.namespaces/import-def
|
||||
potemkin/import-fn macros.potemkin.namespaces/import-fn
|
||||
potemkin/import-macro macros.potemkin.namespaces/import-macro
|
||||
potemkin.namespaces/import-def macros.potemkin.namespaces/import-def
|
||||
potemkin.namespaces/import-fn macros.potemkin.namespaces/import-fn
|
||||
potemkin.namespaces/import-macro macros.potemkin.namespaces/import-macro}}
|
||||
|
||||
:config-in-comment
|
||||
{:linters {:unresolved-symbol {:level :off}}}
|
||||
|
||||
21
.clj-kondo/macros/potemkin/namespaces.clj
Normal file
21
.clj-kondo/macros/potemkin/namespaces.clj
Normal file
@@ -0,0 +1,21 @@
|
||||
(ns macros.potemkin.namespaces)
|
||||
|
||||
(defn- import-var-expansion
|
||||
"Expansion shared by all of the `import-*` replacements below. Synthetic \"docstring\" is needed to silence
|
||||
`:missing-docstring` linter."
|
||||
([sym]
|
||||
(import-var-expansion sym (-> sym name symbol)))
|
||||
([sym new-name]
|
||||
`(def ~new-name "docstring" ~sym)))
|
||||
|
||||
(defmacro import-def
|
||||
([sym] (import-var-expansion sym))
|
||||
([sym new-name] (import-var-expansion sym new-name)))
|
||||
|
||||
(defmacro import-fn
|
||||
([sym] (import-var-expansion sym))
|
||||
([sym new-name] (import-var-expansion sym new-name)))
|
||||
|
||||
(defmacro import-macro
|
||||
([sym] (import-var-expansion sym))
|
||||
([sym new-name] (import-var-expansion sym new-name)))
|
||||
2
src/metabase/cache/core.clj
vendored
2
src/metabase/cache/core.clj
vendored
@@ -7,8 +7,6 @@
|
||||
(comment metabase.cache.models.cache-config/keep-me
|
||||
metabase.cache.settings/keep-me)
|
||||
|
||||
;; the re-exported var carries the docstring; kondo can't see through import-def
|
||||
#_{:clj-kondo/ignore [:missing-docstring]}
|
||||
(p/import-def metabase.cache.models.cache-config/invalidate! invalidate-config!)
|
||||
|
||||
(p/import-vars
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
(ns metabase.driver-api.core
|
||||
;; missing docstring warnings are false positives because of Potemkin
|
||||
{:clj-kondo/config '{:linters {:missing-docstring {:level :off}}}}
|
||||
(:refer-clojure :exclude [replace compile])
|
||||
(:require
|
||||
[metabase.actions.core :as actions]
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
(ns metabase.permissions.core
|
||||
"`permissions` module API namespace."
|
||||
{:clj-kondo/config '{:linters {:missing-docstring {:level :off}}}}
|
||||
(:require
|
||||
[metabase.permissions.data-access-token]
|
||||
[metabase.permissions.models.application-permissions-revision]
|
||||
|
||||
@@ -78,20 +78,12 @@
|
||||
[metabase.query-processor.card
|
||||
parameter-template-tag?])
|
||||
|
||||
;; the re-exported var carries the docstring; kondo can't see through import-def
|
||||
#_{:clj-kondo/ignore [:missing-docstring]}
|
||||
(p/import-def metabase.queries.models.card/populate-query-fields populate-card-query-fields)
|
||||
|
||||
;; the re-exported var carries the docstring; kondo can't see through import-def
|
||||
#_{:clj-kondo/ignore [:missing-docstring]}
|
||||
(p/import-def metabase.query-processor.card/template-tag-parameters card-template-tag-parameters)
|
||||
|
||||
;; the re-exported var carries the docstring; kondo can't see through import-def
|
||||
#_{:clj-kondo/ignore [:missing-docstring]}
|
||||
(p/import-def metabase.queries.models.parameter-card/delete-all-for-parameterized-object!
|
||||
delete-all-parameter-cards-for-parameterized-object!)
|
||||
|
||||
;; the re-exported var carries the docstring; kondo can't see through import-def
|
||||
#_{:clj-kondo/ignore [:missing-docstring]}
|
||||
(p/import-def metabase.queries.models.parameter-card/upsert-or-delete-from-parameters!
|
||||
upsert-or-delete-parameter-cards-from-parameters!)
|
||||
|
||||
@@ -33,10 +33,6 @@
|
||||
[metabase.sso.ldap.settings
|
||||
ldap-enabled])
|
||||
|
||||
;; the re-exported var carries the docstring; kondo can't see through import-def
|
||||
#_{:clj-kondo/ignore [:missing-docstring]}
|
||||
(p/import-def metabase.sso.ldap.default-implementation/UserInfo LDAPUserInfo)
|
||||
|
||||
;; the re-exported var carries the docstring; kondo can't see through import-def
|
||||
#_{:clj-kondo/ignore [:missing-docstring]}
|
||||
(p/import-def metabase.sso.ldap.default-implementation/search ldap-search)
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
|
||||
(comment metabase.lib.schema.metadata/keep-me)
|
||||
|
||||
#_{:clj-kondo/ignore [:missing-docstring]} ; false positive
|
||||
(p/import-def metabase.lib.schema.metadata/column-visibility-types visibility-types)
|
||||
|
||||
(def data-sensitivity-types
|
||||
|
||||
Reference in New Issue
Block a user