From 993ab15f8c90815f3759464aba5e306958ef81e7 Mon Sep 17 00:00:00 2001 From: Sigurd Spieckermann Date: Wed, 17 Apr 2024 12:21:07 +0200 Subject: [PATCH] Add `RUFF_OUTPUT_FILE` environment variable support --- crates/ruff/src/args.rs | 2 +- docs/configuration.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/ruff/src/args.rs b/crates/ruff/src/args.rs index ed98a999afa6c..88467dc502ac1 100644 --- a/crates/ruff/src/args.rs +++ b/crates/ruff/src/args.rs @@ -190,7 +190,7 @@ pub struct CheckCommand { pub output_format: Option, /// Specify file to write the linter output to (default: stdout). - #[arg(short, long)] + #[arg(short, long, env = "RUFF_OUTPUT_FILE")] pub output_file: Option, /// The minimum Python version that should be supported. #[arg(long, value_enum)] diff --git a/docs/configuration.md b/docs/configuration.md index bee5132b6c977..b1f5894d699dc 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -601,7 +601,8 @@ Options: concise, full, json, json-lines, junit, grouped, github, gitlab, pylint, azure, sarif] -o, --output-file - Specify file to write the linter output to (default: stdout) + Specify file to write the linter output to (default: stdout) [env: + RUFF_OUTPUT_FILE=] --target-version The minimum Python version that should be supported [possible values: py37, py38, py39, py310, py311, py312]