0.16.0
Breaking Changes📦 ruffView on GitHub →
⚠ 3 breaking✨ 3 features🐛 1 fixes🔧 3 symbols
Summary
Ruff v0.16.0 significantly expands default rules, introduces Markdown code formatting, and enhances the `format --check` output. It also stabilizes several rules and behaviors.
⚠️ Breaking Changes
- Ruff now enables a much larger set of rules by default (413, up from 59). Users should consult the blog post for details and the new Default Rules page for a full listing of enabled rules.
- Ruff can now format Python code blocks in Markdown files by default. Refer to the documentation for details on Markdown code formatting.
- The `filename`, `location`, `end_location`, `fix.edits[].location`, and `fix.edits[].end_location` fields in the JSON output format may now be `null` instead of defaulting to the empty string and row 1, column 1, respectively.
Migration Steps
- Review the enabled rules due to the significant increase in default rules. Consult the blog post and the Default Rules documentation.
- Update configurations or scripts that rely on the previous behavior of `filename`, `location`, `end_location`, `fix.edits[].location`, and `fix.edits[].end_location` in JSON output to handle potential `null` values.
✨ New Features
- Ruff now supports `ruff: ignore` comments at the ends of lines or on the line preceding a diagnostic, similar to `noqa` comments.
- Fixes are now shown in `check` and `format --check` output, including an example of Markdown code formatting.
- `format --check` now supports the same output formats as the linter, including `github` and `gitlab` for CI annotations.
🐛 Bug Fixes
- Fix missing check on unrecognized early bound (RUF016) ([#26986](https://github.com/astral-sh/ruff/pull/26986))