google / google/closure-compiler

It is needlessly complicated to suppress errors

Open
#4,037 4 comments 1 reaction 0 assignees View on GitHub
feat triage-done
Dominant language
JavaScript
Stars
7.7k
Forks
1.2k
Avg merge
2d 12h
Merged PRs (30d)
6

Description

[Here is a list of suppression tags](https://github.com/google/closure-compiler/wiki/@suppress-annotations) and the corresponding errors that each tag covers. If I have an error/warning in my code and I want to suppress it, first I have to go to the wiki, find the corresponding suppression tag for my error and only then I can suppress it.

Ideally the compiler could output not only the error but also the suppression tag (in case I want to suppress).

Another great feature would be to follow the footsteps of Typescript and add a mechanism to ignore any type checks on a line of code (see [@ts-ignore](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-6.html#suppress-errors-in-ts-files-using--ts-ignore-comments)) or for a whole file ([@ts-nocheck](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#-ts-nocheck-in-typescript-files)).

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.