Skip to content

Commit

Permalink
Add fix safety notes to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Oct 12, 2023
1 parent da40753 commit 8508b85
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,17 @@ the LSP client's `settings.json`:
}
```

## Fix safety

Ruff's automatic fixes are labeled as "safe" and "unsafe". By default, the "Fix all" action will not apply unsafe
fixes. However, unsafe fixes can be applied manually with the "Quick fix" action. Application of unsafe fixes when
using "Fix all" can be enabled by setting `unsafe-fixes = true` in your Ruff configuration file or adding
`--unsafe-fixes` flag to the "Lint args" setting.

See the [Ruff fix docs](https://docs.astral.sh/ruff/configuration/#fix-safety) for more details on how fix
safety works.


## Settings

The exact mechanism by which settings will be passed to `ruff-lsp` will vary by editor. However,
Expand Down

0 comments on commit 8508b85

Please sign in to comment.