microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
744 stars 245 forks source link

[Feature] Add CodeCop rule for checking for not used procedures #4714

Closed makuhn closed 5 years ago

makuhn commented 5 years ago

Add a CodeCop rule to report all procedures (functions) that are declared but not used within this app which means a procedure does not have any reference in actual project.

Benefit of this CodeCop rule is having a better support for code refactoring. Actually there is no possibility to easily retrieve procedures that are no longer needed than having a look into each single AL file and to check the references for each single procedure.

qutreson commented 5 years ago

Hi @makuhn, thank you for your suggestion. This is something that we are currently tracking with #4572. I will close this issue to keep the discussion on this topic in one place, but feel free to comment on the linked issue if you feel that something is missing there