Skip to content

Commit 3827026

Browse files
authored
Reformat table in README (#47)
* Reformat table in README Attempt to make the settings table more readable in the README Signed-off-by: Eric Brown <[email protected]> * Update README.md Signed-off-by: Eric Brown <[email protected]> * Update README.md Signed-off-by: Eric Brown <[email protected]> --------- Signed-off-by: Eric Brown <[email protected]>
1 parent c07dea2 commit 3827026

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,15 @@ For more information on Bandit, see https://bandit.readthedocs.io/
99
## Settings
1010

1111
There are several settings you can configure to customize the behavior of this extension.
12-
13-
| Settings | Default | Description |
14-
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15-
| bandit.args | `[]` | Arguments passed to Bandit for linting Python files. Each argument should be provided as a separate string in the array. <br> Examples: <br>- `"bandit.args": ["--severity-level=high"]` <br> - `"bandit.args": ["--skip=B603", "--confidence-level=high"]` |
16-
| bandit.cwd | `${workspaceFolder}` | Sets the current working directory used to lint Python files with Bandit. By default, it uses the root directory of the workspace `${workspaceFolder}`. You can set it to `${fileDirname}` to use the parent folder of the file being linted as the working directory for Bandit. |
17-
| bandit.enabled | `true` | Enable/disable linting Python files with Bandit. This setting can be applied globally or at the workspace level. If disabled, the linting server itself will continue to be active and monitor read and write events, but it won't perform linting or expose code actions. |
18-
| bandit.path | `[]` | "Path or command to be used by the extension to lint Python files with Bandit. Accepts an array of a single or multiple strings. If passing a command, each argument should be provided as a separate string in the array. If set to `["Bandit"]`, it will use the version of Bandit available in the `PATH` environment variable. Note: Using this option may slowdown linting. <br>Examples: <br>- `"bandit.path" : ["~/global_env/bandit"]` <br>- `"bandit.path" : ["bandit"]` <br>- `"bandit.path" : ["${interpreter}", "-m", "bandit"]` |
19-
| bandit.interpreter | `[]` | Path to a Python executable or a command that will be used to launch the Bandit server and any subprocess. Accepts an array of a single or multiple strings. When set to `[]`, the extension will use the path to the selected Python interpreter. If passing a command, each argument should be provided as a separate string in the array. |
20-
| bandit.importStrategy | `useBundled` | Defines which Bandit binary to be used to lint Python files. When set to `useBundled`, the extension will use the Bandit binary that is shipped with the extension. When set to `fromEnvironment`, the extension will attempt to use the Bandit binary and all dependencies that are available in the currently selected environment. Note: If the extension can't find a valid Bandit binary in the selected environment, it will fallback to using the Bandit binary that is shipped with the extension. This setting will be overriden if `bandit.path` is set. |
21-
| bandit.showNotification | `off` | Controls when notifications are shown by this extension. Accepted values are `onError`, `onWarning`, `always` and `off`. |
12+
| Setting | Default | Description |
13+
|---------------------------|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
14+
| `bandit.args` | `[]` | Arguments passed to Bandit for linting Python files. Each argument should be a separate string in the array. <br> Examples: <br> - `"bandit.args": ["--severity-level=high"]` <br> - `"bandit.args": ["--skip=B603", "--confidence-level=high"]` |
15+
| `bandit.cwd` | `${workspaceFolder}` | Sets the current working directory used to lint Python files with Bandit. By default, it uses the root directory of the workspace. You can set it to `${fileDirname}` to use the parent folder of the file being linted. |
16+
| `bandit.enabled` | `true` | Enable/disable linting Python files with Bandit. This can be set globally or per workspace. When disabled, the linting server continues to monitor files but does not perform linting or expose code actions. |
17+
| `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. |
18+
| `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. |
19+
| `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. |
20+
| `bandit.showNotification` | `off` | Controls when extension notifications appear. Options: `onError`, `onWarning`, `always`, `off`. |
2221

2322
The following variables are supported for substitution in the `bandit.args`, `bandit.cwd`, `bandit.path`, and `bandit.interpreter` settings:
2423

0 commit comments

Comments
 (0)