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

panic: panic when runing linter on conformance test suite #1093

Closed
camc314 opened this issue Oct 29, 2023 · 1 comment · Fixed by #1098
Closed

panic: panic when runing linter on conformance test suite #1093

camc314 opened this issue Oct 29, 2023 · 1 comment · Fixed by #1098
Labels
A-linter Area - Linter E-Help Wanted Experience level - For the experienced collaborators

Comments

@camc314
Copy link
Collaborator

camc314 commented Oct 29, 2023

Failed to read "./tasks/coverage/typescript/tests/cases/compiler/bom-utf16le.ts" with stream did not contain valid UTF-8
cargo run --bin=oxc_cli --profile=release-debug lint --quiet  ./tasks/coverage/
@Boshen Boshen added E-Help Wanted Experience level - For the experienced collaborators A-linter Area - Linter labels Oct 29, 2023
@Boshen
Copy link
Member

Boshen commented Oct 29, 2023

We should return a soft error instead of a panic here.

Boshen pushed a commit that referenced this issue Oct 30, 2023
#1098)

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.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter E-Help Wanted Experience level - For the experienced collaborators
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants