refactor-nrepl
refactor-nrepl copied to clipboard
Honor clj-kondo's namespace local configuration
https://github.com/clojure-emacs/refactor-nrepl/issues/387
This PR makes refactor-nrepl honor clj-kondo's namespace-local configuration of :unused-namespace linter via config.edn file and also via ns meta when performing clean-ns task. I'll fix/add tests if code is fine
- [x] The commits are consistent with our contribution guidelines
- [x] You've added tests (if possible) to cover your change(s)
- [x] All tests are passing (run
lein do clean, test) - [x] Code inlining with mranderson works and tests pass with inlined code (run
./build.sh install-- takes a long time) - [x] You've updated the changelog (if adding/changing user-visible functionality)
- [ ] You've updated the readme (if adding/changing user-visible functionality)
Thanks!
Well, looks like that's it. Unless you have any other comments, of course
All done. Also, I had to use double quote in tests because somehow with single quote it doesn't get the same form as when it's loaded by parse-ns. I don't understand why, to be honest
https://github.com/OknoLombarda/refactor-nrepl/blob/kondo-ns-local-conf/test/refactor_nrepl/ns/libspec_allowlist_test.clj#L62
Also, I took this snippet from clj-kondo's code, so it should work (I guess such a small portion of code won't cause any licensing issues?)
https://github.com/clj-kondo/clj-kondo/blob/master/src/clj_kondo/impl/analyzer/namespace.clj#L475-L478
Thanks!
Also, I had to use double quote in tests
It's good. That happens simply because:
user=> (= '{1 1} {1 1})
true
I guess such a small portion of code won't cause any licensing issues?
Yes, it's really small
Thanks yet again!
Will be cutting a release this evening.
Cheers - V
I have released refactor-nrepl 3.6.0
clj-refactor.el 3.6.0 is been pushed and will be available in a couple hours!