Open
Description
Relates to #16626
In addition to "// deno-coverage-ignore-[file|next|start|stop]" it would be useful to implement "syntax aware" directives.
In the first instance, I would propose the following two directives be added, which I believe would be commonly used.
- "// deno-coverage-ignore-branch" for ignoring specific branches, primarily of an if or switch statement. A motivating example would be to ignore unreachable branches which are used for static
never
type assertions. - "// deno-coverage-ignore-construct" (open to naming suggestions) which would ignore the next syntactic construct, such as an entire function declaration, loop, if/else if/else statement, etc. A motivating example for this would be to ignore the internals of a debug logging utility function.
Both of these can be replaced with "// deno-coverage-ignore-[start|stop]" but would be easier to code review and more convenient as "syntax aware" directives.
Activity