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

Allow Ruff's format to be overridden by an environment variable #1716

Closed
charliermarsh opened this issue Jan 7, 2023 · 4 comments · Fixed by #1731
Closed

Allow Ruff's format to be overridden by an environment variable #1716

charliermarsh opened this issue Jan 7, 2023 · 4 comments · Fixed by #1731
Labels
cli Related to the command-line interface

Comments

@charliermarsh
Copy link
Member

See: #1697.

@charliermarsh charliermarsh added the cli Related to the command-line interface label Jan 7, 2023
@not-my-profile
Copy link
Contributor

not-my-profile commented Jan 7, 2023

I don't really see the point of adding builtin support for that ... can't you just run ruff with --format $RUFF_FORMAT?

@messense
Copy link
Contributor

messense commented Jan 8, 2023

I don't really see the point of adding builtin support for that ... can't you just run ruff with --format $RUFF_FORMAT?

It'd be nice to not have to change a configuration file (like .pre-commit.yaml) to change format, --format $RUFF_FORMAT would require the RUFF_FORMAT environment variable to be present all the time.

@charliermarsh
Copy link
Member Author

Yeah I agree -- I do think there's value to this option specifically.

@jolpica
Copy link

jolpica commented Feb 28, 2024

To anyone coming across this and unable to get this working, the environment variable has been renamed to RUFF_OUTPUT_FORMAT in newer versions of ruff.

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.

4 participants