Skip to content

Commit f18f7ee

Browse files
Document internal flake8 plugin schema and configuration (#57)
Co-authored-by: krassowski <[email protected]>
1 parent 58b229b commit f18f7ee

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

Diff for: CONFIGURATION.md

+10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ This server can be configured using `workspace/didChangeConfiguration` method. E
44
| **Configuration Key** | **Type** | **Description** | **Default**
55
|----|----|----|----|
66
| `pylsp.configurationSources` | `array` of unique `string` items | List of configuration sources to use. | `["pycodestyle"]` |
7+
| `pylsp.plugins.flake8.config` | `string` | Path to the config file that will be the authoritative config source. | `null` |
8+
| `pylsp.plugins.flake8.enabled` | `boolean` | Enable or disable the plugin. | `false` |
9+
| `pylsp.plugins.flake8.exclude` | `array` | List of files or directories to exclude. | `null` |
10+
| `pylsp.plugins.flake8.executable` | `string` | Path to the flake8 executable. | `"flake8"` |
11+
| `pylsp.plugins.flake8.filename` | `string` | Only check for filenames matching the patterns in this list. | `null` |
12+
| `pylsp.plugins.flake8.hangClosing` | `boolean` | Hang closing bracket instead of matching indentation of opening bracket's line. | `null` |
13+
| `pylsp.plugins.flake8.ignore` | `array` | List of errors and warnings to ignore (or skip). | `null` |
14+
| `pylsp.plugins.flake8.maxLineLength` | `integer` | Maximum allowed line length for the entirety of this run. | `null` |
15+
| `pylsp.plugins.flake8.perFileIgnores` | `array` | A pairing of filenames and violation codes that defines which violations to ignore in a particular file, for example: `["file_path.py:W305,W304"]`). | `null` |
16+
| `pylsp.plugins.flake8.select` | `array` | List of errors and warnings to enable. | `null` |
717
| `pylsp.plugins.jedi.extra_paths` | `array` | Define extra paths for jedi.Script. | `[]` |
818
| `pylsp.plugins.jedi.env_vars` | `object` | Define environment variables for jedi.Script and Jedi.names. | `null` |
919
| `pylsp.plugins.jedi.environment` | `string` | Define environment for jedi.Script and Jedi.names. | `null` |

Diff for: pylsp/config/schema.json

+50
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,56 @@
1414
},
1515
"uniqueItems": true
1616
},
17+
"pylsp.plugins.flake8.config": {
18+
"type": "string",
19+
"default": null,
20+
"description": "Path to the config file that will be the authoritative config source."
21+
},
22+
"pylsp.plugins.flake8.enabled": {
23+
"type": "boolean",
24+
"default": false,
25+
"description": "Enable or disable the plugin."
26+
},
27+
"pylsp.plugins.flake8.exclude": {
28+
"type": "array",
29+
"default": null,
30+
"description": "List of files or directories to exclude."
31+
},
32+
"pylsp.plugins.flake8.executable": {
33+
"type": "string",
34+
"default": "flake8",
35+
"description": "Path to the flake8 executable."
36+
},
37+
"pylsp.plugins.flake8.filename": {
38+
"type": "string",
39+
"default": null,
40+
"description": "Only check for filenames matching the patterns in this list."
41+
},
42+
"pylsp.plugins.flake8.hangClosing": {
43+
"type": "boolean",
44+
"default": null,
45+
"description": "Hang closing bracket instead of matching indentation of opening bracket's line."
46+
},
47+
"pylsp.plugins.flake8.ignore": {
48+
"type": "array",
49+
"default": null,
50+
"description": "List of errors and warnings to ignore (or skip)."
51+
},
52+
"pylsp.plugins.flake8.maxLineLength": {
53+
"type": "integer",
54+
"default": null,
55+
"description": "Maximum allowed line length for the entirety of this run."
56+
},
57+
"pylsp.plugins.flake8.perFileIgnores": {
58+
"type": "array",
59+
"default": null,
60+
"description": "A pairing of filenames and violation codes that defines which violations to ignore in a particular file, for example: `[\"file_path.py:W305,W304\"]`)."
61+
},
62+
"pylsp.plugins.flake8.select": {
63+
"type": "array",
64+
"default": null,
65+
"description": "List of errors and warnings to enable."
66+
},
1767
"pylsp.plugins.jedi.extra_paths": {
1868
"type": "array",
1969
"default": [],

0 commit comments

Comments
 (0)