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

CLI: Deprecate --show-sources in favor of --output_format <concise|full> #7350

Closed
zanieb opened this issue Sep 13, 2023 · 0 comments · Fixed by #9687
Closed

CLI: Deprecate --show-sources in favor of --output_format <concise|full> #7350

zanieb opened this issue Sep 13, 2023 · 0 comments · Fixed by #9687
Assignees
Labels
cli Related to the command-line interface

Comments

@zanieb
Copy link
Member

zanieb commented Sep 13, 2023

The --show-sources / --no-show-sources flags should be replaced with --output_format full / --format concise options. Ruff's default format should change to full. These formats would replace the text format, which should undergo a deprecation period.

The flags should also undergo a deprecation period during which

  • They are hidden from the CLI help menu
  • A warning is displayed if they are used
  • They are ignored if --format <..> is provided

The "full" name is up for debate! Feel free to chime in with suggestions.

In #7349 the default behavior is changed to --show-sources / --format full.

@zanieb zanieb added the cli Related to the command-line interface label Sep 13, 2023
@snowsignal snowsignal self-assigned this Jan 29, 2024
@snowsignal snowsignal changed the title CLI: Deprecate --show-sources in favor of --format <concise|full> CLI: Deprecate --show-sources in favor of --output_format <concise|full> Jan 29, 2024
snowsignal added a commit that referenced this issue Jan 30, 2024
…<full|concise>` (#9687)

Fixes #7350

## Summary

* `--show-source` and `--no-show-source` are now deprecated.
* `output-format` supports two new variants, `full` and `concise`.
`text` is now a deprecated variant, and any use of it is treated as the
default serialization format.
* `--output-format` now default to `concise`
* In preview mode, `--output-format` defaults to `full`
* `--show-source` will still set `--output-format` to `full` if the
output format is not otherwise specified.
* likewise, `--no-show-source` can override an output format that was
set in a file-based configuration, though it will also be overridden by
`--output-format`

## Test Plan

A lot of tests were updated to use `--output-format=full`. Additional
tests were added to ensure the correct deprecation warnings appeared,
and that deprecated options behaved as intended.
zanieb pushed a commit that referenced this issue Jan 30, 2024
…<full|concise>` (#9687)

Fixes #7350

## Summary

* `--show-source` and `--no-show-source` are now deprecated.
* `output-format` supports two new variants, `full` and `concise`.
`text` is now a deprecated variant, and any use of it is treated as the
default serialization format.
* `--output-format` now default to `concise`
* In preview mode, `--output-format` defaults to `full`
* `--show-source` will still set `--output-format` to `full` if the
output format is not otherwise specified.
* likewise, `--no-show-source` can override an output format that was
set in a file-based configuration, though it will also be overridden by
`--output-format`

## Test Plan

A lot of tests were updated to use `--output-format=full`. Additional
tests were added to ensure the correct deprecation warnings appeared,
and that deprecated options behaved as intended.
zanieb added a commit that referenced this issue Feb 1, 2024
…<full|concise>` (#9687)

Fixes #7350

## Summary

* `--show-source` and `--no-show-source` are now deprecated.
* `output-format` supports two new variants, `full` and `concise`.
`text` is now a deprecated variant, and any use of it is treated as the
default serialization format.
* `--output-format` now default to `concise`
* In preview mode, `--output-format` defaults to `full`
* `--show-source` will still set `--output-format` to `full` if the
output format is not otherwise specified.
* likewise, `--no-show-source` can override an output format that was
set in a file-based configuration, though it will also be overridden by
`--output-format`

## Test Plan

A lot of tests were updated to use `--output-format=full`. Additional
tests were added to ensure the correct deprecation warnings appeared,
and that deprecated options behaved as intended.
# Conflicts:
#	crates/ruff/tests/integration_test.rs
@zanieb zanieb closed this as completed in 6aa6433 Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command-line interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants