Skip to content

Commit

Permalink
Add enabled setting to README (#280)
Browse files Browse the repository at this point in the history
Co-authored-by: Courtney Webster <[email protected]>
Co-authored-by: Karthik Nadig <[email protected]>
  • Loading branch information
3 people authored Jan 9, 2024
1 parent 3fbac72 commit 3582127
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ The Flake8 extension provides features to improve your productivity while workin

### Disabling Flake8

You can skip linting with Flake8 for specific files or directories by setting the `flake8.ignorePatterns` setting.
You can skip linting with Flake8 for specific files or directories by setting the `flake8.ignorePatterns` setting.

If you wish to disable linting with Flake8 for your entire workspace or globally, you can [disable this extension](https://code.visualstudio.com/docs/editor/extension-marketplace#_disable-an-extension) in Visual Studio Code.
If you wish to disable linting with Flake8 for your entire workspace or globally, you can [disable this extension](https://code.visualstudio.com/docs/editor/extension-marketplace#_disable-an-extension) in Visual Studio Code. Alternatively, you can also disable Flake8 for your entire workspace by setting `"flake8.enabled" : false` in your `settings.json` file.

## Settings

Expand Down Expand Up @@ -81,6 +81,10 @@ There are several settings you can configure to customize the behavior of this e
<td>flake8.ignorePatterns</td>
<td><code>[]</code></td>
<td>Configure [glob patterns](https://docs.python.org/3/library/fnmatch.html) as supported by the fnmatch Python library to exclude files or folders from being linted with Flake8.</td>
<tr>
<td>flake8.enabled</td>
<td><code>true</code></td>
<td>Specifies whether to enable or disable linting Python files using Flake8. 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. </td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"command.restartServer": "Restart Server",
"settings.args.description": "Arguments passed to Flake8 for linting Python files. Each argument should be provided as a separate string in the array. \n Examples: \n- `\"flake8.args\": [\"--rcfile=<file>\"]` \n - `\"flake8.args\": [\"--disable=C0111\", \"--max-line-length=120\"]`",
"settings.cwd.description": "Sets the current working directory used to lint Python files with Flake8. 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 Flake8.",
"settings.enabled.description": "Enable or disable linting using Flake8.",
"settings.enabled.description": "Whether to enable or disable linting Python files using Flake8.",
"settings.severity.description": "Mapping of Flake8's message types to VS Code's diagnostic severity levels as displayed in the Problems window. You can also use it to override specific Flake8 error codes. \n Example:</br> `{\"convention\": \"Information\", \"error\": \"Error\", \"fatal\": \"Error\", \"refactor\": \"Hint\", \"warning\": \"Warning\", \"W0611\": \"Error\", \"undefined-variable\": \"Warning\"}`",
"settings.path.description": "Path or command to be used by the extension to lint Python files with Flake8. 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 `[\"flake8\"]`, it will use the version of Flake8 available in the `PATH` environment variable. Note: Using this option may slowdown linting. \nExamples: \n- `[\"~/global_env/flake8\"]` \n- `[\"conda\", \"run\", \"-n\", \"lint_env\", \"python\", \"-m\", \"flake8\"]` \n `[\"flake8\"]`",
"settings.ignorePatterns.description": "Configure [glob patterns](https://docs.python.org/3/library/fnmatch.html) as supported by the fnmatch Python library to exclude files or folders from being linted with Flake8.",
Expand Down

0 comments on commit 3582127

Please sign in to comment.