Closed as not planned
Closed as not planned
Description
Proposal Details
The deadcode command is quite useful but not well-suited for execution in automated environments such as CI. This is because, even when it discovers unreachable code, it only outputs the list of findings to standard error without sending an exit code.
In this proposal, I suggest properly implementing exit notifications to the OS for the deadcode command, motivated by its usage scenarios.
The implementation could be straightforward: at the end of the main function, simply call os.Exit(2) if the length of the output list of unreachable code is greater than zero.