metabase / metabase

The simplest, fastest way to get business intelligence and analytics to everyone in your company :yum:
https://metabase.com
Other
38.56k stars 5.11k forks source link

Drop our custom namespace declaration linter; use clj-kondo unused require check instead #20969

Closed camsaul closed 1 year ago

camsaul commented 2 years ago

These days clj-kondo can check for unused namespaces as well as unsorted namespaces in the ns declartion... so we don't really need https://github.com/camsaul/lein-check-namespace-decls anymore. Discussed in the backend meeting today -- let's drop this linter and have one less linter to worry about.

Before doing this we need to enable the relevant kondo linter in CI and make sure it's passing. Then when we do that we can drop the old linter entirely

camsaul commented 2 years ago

Probably actually best to tackle #19257 first so we can make use of the custom rules there

camsaul commented 2 years ago

Probably want to do this sooner rather than later since I don't think we can use Clojure 1.11 :as-alias until this is done

dpsutton commented 2 years ago

I think we are close.

❯ clj-kondo --lint src:shared/src
src/metabase/task/refresh_slack_channel_user_cache.clj:52:25: error: clojurewerkz.quartzite.schedule.simple/with-interval-in-seconds is called with 1 arg but expects 2
src/metabase/util/i18n/impl.clj:202:24: warning: unused binding e
linting took 6051ms, errors: 1, warnings: 1

The .clj-kondo/config.edn has the namespace linter enabled. We just need to clear up these last two lint warnings and we're good. One is trivial, the other requires a hook or maybe just a #_:clj-kondo/ignore if we just want to ignore it.

camsaul commented 1 year ago

Implemented by #24752