-
-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(linter): add DiagnosticResult to the Reporters for receiving a s…
…ub part result (#8666) We are currently outputting only for the default-outputter some extra information: https://github.com/oxc-project/oxc/blob/3be03926e8a5097e5c1fe249b8bff0009ec4468d/apps/oxlint/src/result.rs#L61-L87 My goal is that all information will be passed to our new DiagnosticReporter / OutputFormatter. This will break the output format in the next PR. **Merging this PR is the OK for me to make this change**⚠️ The only breaking point: `"Found {number_of_warnings} warning{} and {number_of_errors} error{}."` will still be outputted when `max_warnings_exceeded` is true. Because this is something the `DiagnosticReporter` should do and not the `OutputFormatter`. The end goal is: - no `println!`, our `OutputFormatter` and his `DiagnosticReporter` will return `Option<String>` and we output it the our `stdout` - `LintResult` will only handle `ExitCode` result and nothing more - `stdout` can be changed from outside (for the next part) - add snapshots with a custom `stdout` I do not know if all goals can be done easily. Last two parts should be a bit tricky for me, never did test setups in rust. But we do never stop to learn ;)
- Loading branch information
Showing
9 changed files
with
114 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.