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

🐛 organizeImports causes check to fail but does not print errors with --diagnostic-level=error #2288

Closed
1 task done
valkum opened this issue Apr 3, 2024 · 1 comment · Fixed by #2292
Closed
1 task done
Assignees
Labels
A-CLI Area: CLI A-Diagnostic Area: diagnostocis S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@valkum
Copy link

valkum commented Apr 3, 2024

Environment information

> [email protected] rage
> biome rage

CLI:
  Version:                      1.6.4
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.11.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/10.2.4"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

What happened?

Repro is available here https://codesandbox.io/p/devbox/practical-snowflake-dh8pwq
Run npm i && npm run check in the terminal.
See that the check command failed but does not print the organizeImports errors

> biome check ./src --diagnostic-level=error

Checked 1 file in 1445µs. No fixes needed.
Found 1 error.
check ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ Some errors were emitted while running checks.

Expected result

Run npm run check-working which prints the error causing organizeImports output as green warnings.

> biome check ./src

./src/index.js organizeImports ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ℹ Import statements could be sorted:
  
    1   │ - import·{·graphql,·useFragment,·useMutation·}·from·"react-relay";
    2   │ - import·{·FC,·memo,·useCallback·}·from·"react";
      1 │ + import·{·FC,·memo,·useCallback·}·from·"react";
      2 │ + import·{·graphql,·useFragment,·useMutation·}·from·"react-relay";
    3 3 │   
    4 4 │   console.log("Hello CodeSandbox");
  

Checked 1 file in 1960µs. No fixes needed.
Found 1 error.
check ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ Some errors were emitted while running checks.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Sec-ant Sec-ant added A-CLI Area: CLI A-Diagnostic Area: diagnostocis S-Bug-confirmed Status: report has been confirmed as a valid bug labels Apr 4, 2024
@Sec-ant Sec-ant self-assigned this Apr 4, 2024
@valkum
Copy link
Author

valkum commented Apr 4, 2024

Thanks for the very fast fix 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Area: CLI A-Diagnostic Area: diagnostocis S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants