Skip to content

🐛 biome returns 0 when file exceeds maxSize even if --error-on-warnings is enabled #9941

@gabegorelick

Description

@gabegorelick

Environment information

Details
CLI:
  Version:                      2.4.7
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:                    unset
  BIOME_LOG_PREFIX_NAME:             unset
  BIOME_LOG_LEVEL:                   unset
  BIOME_LOG_KIND:                    unset
  BIOME_CONFIG_PATH:                 unset
  BIOME_THREADS:                     unset
  BIOME_WATCHER_KIND:                unset
  BIOME_WATCHER_POLLING_INTERVAL:    unset
  NO_COLOR:                     unset
  TERM:                         xterm-256color
  JS_RUNTIME_VERSION:           v24.9.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         pnpm/10.32.1

Biome Configuration:
  Status:                       Loaded successfully
  Path:                         biome.jsonc
  Formatter enabled:            true
  Linter enabled:               true
  Assist enabled:               true
  VCS enabled:                  true
  HTML full support enabled:    unset

Workspace:
  Open Documents:               0

What happened?

  1. Have a file greater than files.maxSize in size
  2. Run biome check --error-on-warnings or biome ci --error-on-warnings
  3. You will get a warning logged about how a file was skipped due to exceeding max size, but biome will still exit with code 0

Expected result

biome exits with a non-0 code. This is useful so that CI pipelines fail, developers get notified, and the file can either be ignored or files.maxSize can be increased. Currently, it's easy to miss that biome is emitting the warning.

Alternatively, a new option to error just on maxSize could be added to biome. That way users that don't want to error on other warnings can still get errors on maxSize.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

Labels

S-Needs triageStatus: this issue needs to be triaged

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions