You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,16 +19,20 @@ There are several settings you can configure to customize the behavior of this e
19
19
|`bandit.path`|`[]`| Path or command used by the extension to run Bandit. Accepts an array of strings (each arg separate). <br> Examples: <br> - `"bandit.path": ["~/global_env/bandit"]` <br> - `"bandit.path": ["bandit"]` <br> - `"bandit.path": ["${interpreter}", "-m", "bandit"]` <br> If set to `["bandit"]`, it uses the Bandit available in your `PATH`. Note: Using a custom path may slow down linting. |
20
20
|`bandit.interpreter`|`[]`| Python executable or command used to launch Bandit. Accepts an array of strings (each arg separate). If left as `[]`, it uses the selected Python interpreter. |
21
21
|`bandit.importStrategy`|`useBundled`| Specifies which Bandit binary to use. `useBundled` uses the version shipped with the extension. `fromEnvironment` uses the Bandit in the current Python environment. If it can't find one, it falls back to the bundled version. Overridden if `bandit.path` is set. |
The following variables are supported for substitution in the `bandit.args`, `bandit.cwd`, `bandit.path`, and `bandit.interpreter` settings:
24
+
### Variable Substitution
25
25
26
-
-`${workspaceFolder}`
27
-
-`${workspaceFolder:FolderName}`
28
-
-`${userHome}`
29
-
-`${env:EnvVarName}`
26
+
The following variables are supported for substitution in the `bandit.args`, `bandit.cwd`, and `bandit.path` settings:
30
27
31
-
The `bandit.path` setting also supports the `${interpreter}` variable as one of the entries of the array. This variable is subtituted based on the value of the `bandit.interpreter` setting.
Copy file name to clipboardExpand all lines: package.nls.json
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
"command.restartServer": "Restart Server",
3
3
"extension.description": "The official Bandit extension developed by PyCQA",
4
4
"settings.args.description": "Arguments passed in. Each argument is a separate item in the array.",
5
+
"settings.cwd.description": "Working directory for Bandit. Defaults to workspace folder if not set.",
5
6
"settings.enabled.description": "Enable/disable linting Python files with Bandit.",
6
7
"settings.path.description": "When set to a path to bandit binary, extension will use that. NOTE: Using this option may slowdown server response time.",
7
8
"settings.importStrategy.description": "Defines where `bandit` is imported from. This setting may be ignored if `bandit.path` is set.",
0 commit comments