You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Hyuga-Tsukui
changed the title
proposal: x/tools/cmd/deadcode: Notify OS of exit code 2 when unreachable code is found
proposal: x/tools/cmd/deadcode: Notify OS of exit code 2,1 when unreachable code is found
Feb 29, 2024
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.
The text was updated successfully, but these errors were encountered: