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
ah 👍
I suspect it's a superset / overlap of carve
(The verbose logging refers to using clj-kondo from memory)
right. I tried carve and was overwhelmed. started trying to use https://gist.github.com/borkdude/841d85d5ad04c517337166b3928697bd and ran into https://github.com/clj-kondo/clj-kondo/issues/1319
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 🙂