diff --git a/CONFIGURATION.md b/CONFIGURATION.md index acf8a85f..bb07fce9 100644 --- a/CONFIGURATION.md +++ b/CONFIGURATION.md @@ -9,6 +9,7 @@ This server can be configured using the `workspace/didChangeConfiguration` metho | `pylsp.plugins.flake8.enabled` | `boolean` | Enable or disable the plugin. | `false` | | `pylsp.plugins.flake8.exclude` | `array` of `string` items | List of files or directories to exclude. | `[]` | | `pylsp.plugins.flake8.extendIgnore` | `array` of `string` items | List of errors and warnings to append to ignore list. | `[]` | +| `pylsp.plugins.flake8.extendSelect` | `array` of `string` items | List of errors and warnings to append to select list. | `[]` | | `pylsp.plugins.flake8.executable` | `string` | Path to the flake8 executable. | `"flake8"` | | `pylsp.plugins.flake8.filename` | `string` | Only check for filenames matching the patterns in this list. | `null` | | `pylsp.plugins.flake8.hangClosing` | `boolean` | Hang closing bracket instead of matching indentation of opening bracket's line. | `null` | diff --git a/pylsp/config/flake8_conf.py b/pylsp/config/flake8_conf.py index 5e969d97..74258709 100644 --- a/pylsp/config/flake8_conf.py +++ b/pylsp/config/flake8_conf.py @@ -27,6 +27,7 @@ # flake8 ("exclude", "plugins.flake8.exclude", list), ("extend-ignore", "plugins.flake8.extendIgnore", list), + ("extend-select", "plugins.flake8.extendSelect", list), ("filename", "plugins.flake8.filename", list), ("hang-closing", "plugins.flake8.hangClosing", bool), ("ignore", "plugins.flake8.ignore", list), diff --git a/pylsp/config/schema.json b/pylsp/config/schema.json index ba1d36f8..2259f1cc 100644 --- a/pylsp/config/schema.json +++ b/pylsp/config/schema.json @@ -53,6 +53,14 @@ }, "description": "List of errors and warnings to append to ignore list." }, + "pylsp.plugins.flake8.extendSelect": { + "type": "array", + "default": [], + "items": { + "type": "string" + }, + "description": "List of errors and warnings to append to select list." + }, "pylsp.plugins.flake8.executable": { "type": "string", "default": "flake8", @@ -500,4 +508,4 @@ "description": "The name of the folder in which rope stores project configurations and data. Pass `null` for not using such a folder at all." } } -} \ No newline at end of file +} diff --git a/pylsp/plugins/flake8_lint.py b/pylsp/plugins/flake8_lint.py index 47121018..74e2664c 100644 --- a/pylsp/plugins/flake8_lint.py +++ b/pylsp/plugins/flake8_lint.py @@ -72,6 +72,7 @@ def pylsp_lint(workspace, document): "config": settings.get("config"), "exclude": settings.get("exclude"), "extend-ignore": settings.get("extendIgnore"), + "extend-select": settings.get("extendSelect"), "filename": settings.get("filename"), "hang-closing": settings.get("hangClosing"), "ignore": ignores or None,