google / google/closure-compiler

Make it easier to go from an errors/warnings to `@suppress` tag

Open
#4,114 0 comments 0 reactions 0 assignees View on GitHub
P3
Dominant language
JavaScript
Stars
7.7k
Forks
1.2k
Avg merge
2d 12h
Merged PRs (30d)
6

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.