Task #37502
closedRemove commented-out code
100%
Description
Code can be commented out for several reasons:
1. debug code
2. code that does not work
3. old versions of the code
4. code that is part of some unfinished feature/change set and should not be used yet
5. code that has turned out to be not necessary after all
Commented-out code usually is not maintained, makes the code harder to read and cannot be unit-tested. It should be removed.
Concerning the separate reasons:
1. Debug modes should be enabled by settings, not be enabling/disabling the code.
2. Code that should not be executed should just get removed.
3. We have GIT for providing access to older versions of the code.
4. Unfinished feature should be in patches, branches and changesets.
5. Code that should not be executed should just get removed.