closure-compiler
closure-compiler copied to clipboard
Make it easier to go from an errors/warnings to `@suppress` tag
Compiler warnings like WARNING - [JSC_UNREACHABLE_CODE] unreachable code
may often be suppressed by finding the corresponding diagnostic group and adding a @suppress
tag, in this case @suppress {uselessCode}
.
We document the corresponding diagnostic groups at https://github.com/google/closure-compiler/wiki/@suppress-annotations#error-to-suppression-map but we would ideally make it even easier for users to suppress these kinds of warnings.
One idea is printing the diagnostic group uselessCode
in the error message.
This came up in https://github.com/google/closure-compiler/issues/4113.