clojure-australia 2021-07-20

Morning folks 👋 . How are peoples days looking? Bug triage and fixing for me.

Morning all.

I've just done clojure-lsp clean-ns for the first time and it feels sooo good.

That's cool. I hadn't looked at clojure-lsp because I assumed it was just for IDE developers. Down the rabbit hole we go ...

Here's my TLDR

dependabot updates for me. finishing off feature branches before starting anotherone 😄

I added this to my deps.edn

:aliases
  {:lint-ns {:replace-deps {com.github.clojure-lsp/clojure-lsp {:mvn/version "2021.07.19-14.46.52"}}
             :exec-fn clojure-lsp.api/clean-ns!
             :exec-args {:dry? false}}}}

Then ran clojure -X:lint-ns

(as an aside, my project has dated deps and :replace-deps was needed to deal with a tasso logging version conflict which crashed things)

hmm. would that be an alternative to clj-kondo linting?

similar / overlapping

I suspect it's a superset / overlap of carve

(The verbose logging refers to using clj-kondo from memory)

I've found carve useful and reliable.

yeah I just had so much unused code! the linked gist is a single symbol search for all usages

eg i was hoping i could integrate it into my IDE so that for a specific symbol I could find all usages

ie cleanup things one by one

Ah, gotcha

I mean I suppose I could scope carve to a specific ns or symbol even

I'm new to clojure-lsp but the brew installable command line tools include these:

clean-ns Organize ns form, removing unused requires/refers/imports and sorting alphabetically. format Format code using cljfmt. rename Rename a symbol and all references across the project, use --from and --to options.

ah right - the clean-ns does sound useful

for comparison - clj-kondo integrated into vim for unusued imports warnings, etc

Nice. The intellij integration works well too. Bit involved to setup but then red squiggles guide you.

+1 red squiggles 🙂