Closed OknoLombarda closed 2 years ago
I'll add tests and update readme if you have no comments regarding the code
The resolution of https://github.com/clojure-emacs/refactor-nrepl/issues/359#issuecomment-1032401701 is quite more recent than the one of the other issue.
I'd like refactor-nrepl to contribute to a more explicit, standarized tooling landscape.
The lack of an alias does't mean much in official Clojure terms. The extra semantic is a clj-kondo invention, that precedes its more explicit :unused-namespace
config.
So I'd prefer that people write explicit .clj-kondo config. It's something that refactor-nrepl currently reads. It also is something that other tools (e.g. Eastwood) could also eventually read.
It's a much better approach than reading magic comments (#_,,,
) or making up semantics. For users and tool makers alike.
Also, non trivially, one approach is naturally more prone to false positives than the other.
If I add an entry to my .clj-kondo file, then my intent is certain.
Contrariwise, adding [some-lib]
without an alias is an everyday action, it can happen for any reason, from any person. So we can easily get a false positive.
For that reason alone, e.g. making our tools correct I think the right approach is clear now. It's not just aesthetics or 'standards'.
Will be moving this PR to draft (with the intent of closing it if there isn't much opposition)
Yeah, I just though that'd be convenient, but you're right, picking convenience in some situations over correctness is not worth it 【⸟ ͟ʖ⸟】
Any reason this could not be extended to actually using the clj-kondo file? Or is that already supported?
It is already supported https://github.com/clojure-emacs/refactor-nrepl/pull/361
Excellent 👍👍
Thank you both for the understanding! 🍻
Add setting that allows keeping unused unaliased requires, disabled by default
lein do clean, test
)./build.sh install
-- takes a long time)Thanks!