Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass argument extendIgnore to flake8 #469

Merged
merged 1 commit into from
Oct 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This server can be configured using the `workspace/didChangeConfiguration` metho
| `pylsp.plugins.flake8.config` | `string` | Path to the config file that will be the authoritative config source. | `null` |
| `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.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` |
Expand Down
1 change: 1 addition & 0 deletions pylsp/config/flake8_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
("select", "plugins.pycodestyle.select", list),
# flake8
("exclude", "plugins.flake8.exclude", list),
("extend-ignore", "plugins.flake8.extendIgnore", list),
("filename", "plugins.flake8.filename", list),
("hang-closing", "plugins.flake8.hangClosing", bool),
("ignore", "plugins.flake8.ignore", list),
Expand Down
8 changes: 8 additions & 0 deletions pylsp/config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@
},
"description": "List of files or directories to exclude."
},
"pylsp.plugins.flake8.extendIgnore": {
"type": "array",
"default": [],
"items": {
"type": "string"
},
"description": "List of errors and warnings to append to ignore list."
},
"pylsp.plugins.flake8.executable": {
"type": "string",
"default": "flake8",
Expand Down
1 change: 1 addition & 0 deletions pylsp/plugins/flake8_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def pylsp_lint(workspace, document):
opts = {
"config": settings.get("config"),
"exclude": settings.get("exclude"),
"extend-ignore": settings.get("extendIgnore"),
"filename": settings.get("filename"),
"hang-closing": settings.get("hangClosing"),
"ignore": ignores or None,
Expand Down
Loading