Skip to content

Test diagnostics #6

Description

@voltrevo

I'd like files in inputs/** to be able to be annotated with diagnostics for automated testing, similar to how test_output! works.

For example, I'd like to be able to change inputs/passing/captureMutated.ts to this:

export default function main() {
  let x = 0;
  x++; //! lint(cap-const)

  function foo() {
    return x; //! error(cap-mutate)
  }

  return foo();
}

If extra diagnostics are generated that aren't annotated in the source, it shouldn't fail the file. An extra directive that claims the diagnostic annotations are complete would be nice though.

next-line versions of these annotations would also be good.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions