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

fix(linter)!: Use --output-format in the RUFF linter #77

Merged
merged 6 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .lintrunner.toml
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ init_command = [
'run',
'pip_init',
'--dry-run={{DRYRUN}}',
'ruff==0.0.262',
'ruff==0.0.291',
]
is_formatter = true

Expand Down
4 changes: 2 additions & 2 deletions lintrunner_adapters/adapters/ruff_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def check_files(
"ruff",
"--exit-zero",
"--quiet",
"--format=json",
"--output-format=json",
*([f"--config={config}"] if config else []),
*filenames,
],
Expand Down Expand Up @@ -238,7 +238,7 @@ def check_file_for_fixes(

def main() -> None:
parser = argparse.ArgumentParser(
description=f"Ruff linter. Linter code: {LINTER_CODE}. Use with RUFF-FIX to auto-fix issues.",
description=f"Ruff linter with auto-fix support. Linter code: {LINTER_CODE}.",
fromfile_prefix_chars="@",
)
parser.add_argument(
Expand Down
4 changes: 2 additions & 2 deletions lintrunner_adapters/adapters/rustfmt_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ def check_file(
replacement=None,
description=(
"Possible rustfmt bug. "
"rustfmt returned error output but didn't fail:\n{}"
).format(clean_err),
f"rustfmt returned error output but didn't fail:\n{clean_err}"
),
)
]

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ warn_unused_ignores = false

[tool.poetry]
name = "lintrunner-adapters"
version = "0.9.0"
version = "0.10.0"
description = "Adapters and tools for lintrunner"
authors = ["Justin Chu <[email protected]>"]
license = "MIT"
Expand Down