View list of public elements not consumed
1344
Views
16
Comments
On our RadarOn our Radar
Architecture & Governance 

It would be really good to have a list of all unconsumed public elements from a producer module.


This would be of great help in 2 scenarios:

- while review code from other developers

- while working on an application that was developed by other teams


It is very common that code gets developed with a purpose in mind, but somewhere down the line it becomes obsolete or ends up not being needed. If teams are not methodic, a lot of unused public elements end-up bloating up the module. I am currently working on a project developed during 2 years by another company. I constantly find unused public elements all over the place. They obviously are obsolete, and if my team needs some of that functionality, most likely we will develop from scratch rather than have to search if some code exists for the purpose we need. Hence, unconsumed elements are as pure trash on the application. But there is no way to make a bulk clean up. It would be great to be all to see a full list without having to go one by one.


Great idea!

Btw, this component shows the list of all the unused public elements in an environment.

But an integrated way to show that information would be a great way to help developers to keep track of dead code and delete it in one go!

Indeed an integrated way would be the best.

Maybe something at the module level like the existing "remove unused dependencies" but for public unused references. 

Good one!

Merged this idea with 'Have a way of checking not used Public elements' (created on 22 Dec 2020 16:28:58 by Rafael Sousa)

In large projects, sometimes we lose track on what is being used and not. 

For non public elements we get a warning saying that the element is not being used.

For public ones, the only way is to find usages in other modules. This is a manual action that needs to be performed in every element that we want to check.

My idea is to have an option to run this for all public elements and to present the results for the ones not in use at the bottom (like the search functionality).

It should be an on demand action because it can take quite awhile to finish in big projects.






This comment was:
- originally posted on idea 'Have a way of checking not used Public elements' (created on 22 Dec 2020 by Rafael Sousa)
- merged to idea 'View list of public elements not consumed' on 27 Dec 2020 10:38:12 by Daniël Kuhlmann

Good idea, Rafael!

It would come in very handy when it comes to pay technical debt and keep the code clean. Hope it gets implemented some time soon!


Cheers!



This comment was:
- originally posted on idea 'Have a way of checking not used Public elements' (created on 22 Dec 2020 by Rafael Sousa)
- merged to idea 'View list of public elements not consumed' on 27 Dec 2020 10:38:12 by Daniël Kuhlmann

Great idea!

Btw, this component shows the list of all the unused public elements in an environment.

But an integrated way to show that information would be a great way to help developers to keep track of dead code.

Also this idea is a bit similar to this one.



This comment was:
- originally posted on idea 'Have a way of checking not used Public elements' (created on 22 Dec 2020 by Rafael Sousa)
- merged to idea 'View list of public elements not consumed' on 27 Dec 2020 10:38:12 by Daniël Kuhlmann

Alexandre, thanks for showing the other idea, I will follow (and like) the other one.

I wanted also to cancel this one so we have only one place to comment and follow, but i'm not able to.



This comment was:
- originally posted on idea 'Have a way of checking not used Public elements' (created on 22 Dec 2020 by Rafael Sousa)
- merged to idea 'View list of public elements not consumed' on 27 Dec 2020 10:38:12 by Daniël Kuhlmann

Rafael,

Don't worry about having 2 similar ideas because a moderator will soon notice that and merge them.


Cheers!



This comment was:
- originally posted on idea 'Have a way of checking not used Public elements' (created on 22 Dec 2020 by Rafael Sousa)
- merged to idea 'View list of public elements not consumed' on 27 Dec 2020 10:38:12 by Daniël Kuhlmann

Hi Ricardo,

Yes, one shouldn't worry to much about similar ideas, on the other hand, I would advice to first look if the Idea you have already exists, and then just vote for it. A few moderators are almost daily analyzing ideas for merge in their free time. Some ideas get posted over and over again, because people don't first check if the idea already exists.

Regards,

Daniel



This comment was:
- originally posted on idea 'Have a way of checking not used Public elements' (created on 22 Dec 2020 by Rafael Sousa)
- merged to idea 'View list of public elements not consumed' on 27 Dec 2020 10:38:12 by Daniël Kuhlmann

Yeah, seems great!

It would be an excellent feature to keep the code clean and organized.

Changed the category to
Architecture Dashboard
Changed the status to
On our RadarOn our radar
Merged this idea with 'Show warning for public elements not used in other modules' (created on 25 Oct 2022 18:22:55 by Hebert Saulo Teixeira Gomes)

Show warning for public elements not used in other modules.

Merged this idea with 'List of public items that are not in use.' (created on 24 Feb 2026 13:28:57 by Raquel Soares lira)

Although we can search each element and see where it's used in other modules, it would be very useful to be able to view, by module, the elements that are public but not in use in the service center.