Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Add 'lint errors with context and full details' output mode #263

Open
fredemmott opened this issue Feb 12, 2020 · 2 comments
Open

Add 'lint errors with context and full details' output mode #263

fredemmott opened this issue Feb 12, 2020 · 2 comments

Comments

@fredemmott
Copy link
Contributor

fredemmott commented Feb 12, 2020

For example, something along the lines of input file:

function foo(): void {
  for($i = 0; $i < 10; $i++) {
    await bar();
  }
}

HHAST could optionally output something like...

  function foo(): void {
    for($i = 0; $i < 10; $i++) {
>     await bar();
|     ^^^^^^^^^^^
| DontAwaitInALoop Linter:
| blah blah blah more details here
    }
  }

Even if not directly useful, it would be good to use this for the unit test non-autofix .expect files - they would be much easier to review for correctness and completeness

@fredemmott
Copy link
Contributor Author

actually, we basically have this, it's the default mode.

What's needed is to add /all/ the information that's in the JSON output to it to allow replacing the expect files

@fredemmott fredemmott changed the title Add 'lint errors with context' output mode Add 'lint errors with context and full details' output mode Feb 12, 2020
@jjergus
Copy link
Contributor

jjergus commented Feb 12, 2020

also the AwaitInLoop linter intentionally overrides the default output to print out specific lines but doesn't point to the exact relevant node at each line

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants