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

fix(linter) Report error instead of panicing if the file fails to open #1098

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

camc314
Copy link
Collaborator

@camc314 camc314 commented Oct 29, 2023

closes #1093

e.g.

RUST_BACKTRACE=full cargo run  --bin=oxc_cli lint -D=suspicious -D=style -D=restriction -D=pedantic -D=nursery -D=correctness -A=no-useless-escape ./tasks/coverage/typescript/tests/cases/compiler/corrupted.ts

Results in:


  × Failed to open file
  help: Failed to open file "./tasks/coverage/typescript/tests/cases/compiler/corrupted.ts" with error "stream did not contain valid UTF-8"

Finished in 10ms on 1 file with 126 rules using 12 threads.
Found 0 warnings and 1 error.

@camc314 camc314 requested a review from Boshen October 29, 2023 18:13
@github-actions github-actions bot added the A-linter Area - Linter label Oct 29, 2023
@Boshen Boshen merged commit cef075d into oxc-project:main Oct 30, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

panic: panic when runing linter on conformance test suite
2 participants