Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify unused namespaces (via import or require) - 0.1.04 #75

Closed
hlship opened this issue Oct 29, 2013 · 7 comments
Closed

Identify unused namespaces (via import or require) - 0.1.04 #75

hlship opened this issue Oct 29, 2013 · 7 comments
Labels
new Marks issues describing new features released Marks issues which have had the fixes released in a stable build
Milestone

Comments

@hlship
Copy link

hlship commented Oct 29, 2013

I would very much like it if Cursive could identify (use) and (require) in the (ns) element that are not actually used, and provide an intention to clean them up.

@cursive-ide
Copy link
Owner

Yes, this is on my list to do very soon, along with unused local symbols (function parameters, local bindings etc).

@cursive-ide
Copy link
Owner

Well, after only a year, the first part of this is implemented - Cursive will mark unused aliases from :require and :use forms. There's no intention to clean up yet and :referred items are also not marked, that should be coming soon. In general the intention is a little tricky because require is not just an aliasing mechanism, it also loads code, so removing it automatically can break code.

@hlship
Copy link
Author

hlship commented Nov 17, 2014

Thanks for implementing this, and I look forward to the later improvements.

@hlship
Copy link
Author

hlship commented Apr 1, 2015

So, how the :refer part coming along? And the intentions?

I'm just a bit obsessive about my (ns) block containing only exactly what's currently used by the code.

@dmarjenburgh
Copy link

@hlship you might want to take a look at slamhound. It sounds like it does exactly what you want.

@cursive-ide
Copy link
Owner

No real progress, sorry, I've been tied up with other things - I'll try to get to it soon. Once that's working I can do a proper "Optimize namespace", too, which will be great, and this is also the basis of other useful things like moving functions to other namespaces (see #817).

@pmoriarty
Copy link

We're using :refer quite a lot and would love to see unused refers highlighted at least.

@cursive-ide cursive-ide modified the milestones: Shortlist, 1.12.2-eap4 Feb 13, 2022
@cursive-ide cursive-ide added the new Marks issues describing new features label Feb 13, 2022
@cursive-ide cursive-ide added the released Marks issues which have had the fixes released in a stable build label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new Marks issues describing new features released Marks issues which have had the fixes released in a stable build
Projects
None yet
Development

No branches or pull requests

5 participants