Open fingerartur opened 1 year ago
This will be discussed in the upcoming internal triage meeting. A couple of thoughts:
On the plus side, we wouldn't have to update the open source documentation after code changes. For e.g. the current document is already out of date and incorrect after the recent change (cr/491741410) (Allow @Suppress on arbitrary expression statements)
Ideally the compiler could output not only the error but also the suppression tag (in case I want to suppress).
I'm afraid one downside is that this could encourage / hasten the suppression of genuine code errors revealed by the compiler.
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) or for a whole file (@ts-nocheck).
Fyi, even internally, we disallow adding blanket // @ts-ignore
s internally without a valid motivating project / effort which needs bulk suppressions to land.
any plans to support this?
We agreed it's useful to have error messages print the diagnostic group to suppress them (if they're suppressible) and maybe to make it possible to add suppressions on any line, but this is currently in our backlog and not prioritized.
We agreed it's useful to have error messages print the diagnostic group to suppress them (if they're suppressible) and maybe to make it possible to add suppressions on any line, but this is currently in our backlog and not prioritized.
thanks for the heads up
Here is a list of suppression tags 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) or for a whole file (@ts-nocheck).