refactor-nrepl icon indicating copy to clipboard operation
refactor-nrepl copied to clipboard

Honor clj-kondo's namespace local configuration

Open OknoLombarda opened this issue 3 years ago • 1 comments

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!

OknoLombarda avatar Oct 15 '22 06:10 OknoLombarda

Well, looks like that's it. Unless you have any other comments, of course

OknoLombarda avatar Oct 16 '22 08:10 OknoLombarda

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

OknoLombarda avatar Oct 17 '22 04:10 OknoLombarda

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

vemv avatar Oct 17 '22 06:10 vemv

Thanks yet again!

Will be cutting a release this evening.

Cheers - V

vemv avatar Oct 17 '22 09:10 vemv

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!

vemv avatar Oct 23 '22 16:10 vemv