kaste / SublimeLinter-contrib-ruff

Adapter to the ruff linter
MIT License
5 stars 0 forks source link

Plugin breaks if ruff config contains `fix = true` #1

Closed Daverball closed 2 months ago

Daverball commented 2 months ago

https://github.com/kaste/SublimeLinter-contrib-ruff/blob/e7b70fcf41c6bcee5c2992e4831ab9063eea1f2f/linter.py#L27

I would suggest extending the command with --no-fix to ensure that the plugin still works even if a project contains a ruff config that is setup for something like pre-commit where it's always expected to apply autofixes. Otherwise it will crash when trying to parse the output as JSON, since the output first contains the fixed file and then the JSON output.

kaste commented 2 months ago

Thanks for reporting. Wasn't aware of the --no-fix option.