Skip to content

/* c8 ignore next */ does not ignore classes or functions #544

@jasonpolites

Description

@jasonpolites
  • Version: v22.9.0
  • Platform: Ubuntu 20.04.6 LTS

The /* c8 ignore next */ comment annotation does not seem to ignore classes or functions.

By contrast, the /* istanbul ignore next */ annotation will ignore classes, functions, blocks and lines.

For example:

/* c8 ignore next */
class Foo {  // <== ignored!
  foo = 'foo'; // <== not ignored :(
  bar = 'bar'; // <== not ignored :(
} // <== not ignored :(

Ideally the ignore next would ignore the entire block, function, or class

Similarly:

class Foo {
  /* c8 ignore next */
  foo() {  // <== ignored!
    console.log('bar'); // <== not ignored :(
  } // <== not ignored :(
} // <== not ignored :(

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions