Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test diagnostics #6

Open
voltrevo opened this issue Mar 8, 2023 · 0 comments
Open

Test diagnostics #6

voltrevo opened this issue Mar 8, 2023 · 0 comments
Labels
good first issue Good for newcomers

Comments

@voltrevo
Copy link
Owner

voltrevo commented Mar 8, 2023

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.

@voltrevo voltrevo added the good first issue Good for newcomers label Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant