Skip to content

Commit

Permalink
ruff server: Introduce settings for directly configuring the linter…
Browse files Browse the repository at this point in the history
… and formatter (#10984)

## Summary

The following client settings have been introduced to the language
server:
* `lint.preview`
* `format.preview`
* `lint.select`
* `lint.extendSelect`
* `lint.ignore`
* `exclude`
* `lineLength`

`exclude` and `lineLength` apply to both the linter and formatter.

This does not actually use the settings yet, but makes them available
for future use.

## Test Plan

Snapshot tests have been updated.
  • Loading branch information
snowsignal committed Apr 18, 2024
1 parent 5da7299 commit 2cc487e
Show file tree
Hide file tree
Showing 3 changed files with 222 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
}
},
"lint": {
"ignore": ["RUF001"],
"run": "onSave"
},
"fixAll": false,
"logLevel": "warn"
"logLevel": "warn",
"lineLength": 80,
"exclude": ["third_party"]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
},
"lint": {
"enable": true,
"preview": false,
"run": "onType",
"args": [
"--preview"
Expand Down Expand Up @@ -85,6 +86,8 @@
},
"lint": {
"enable": true,
"preview": true,
"select": ["F", "I"],
"run": "onType",
"args": [
"--preview"
Expand Down
Loading

0 comments on commit 2cc487e

Please sign in to comment.