Created
February 3, 2021 19:48
-
-
Save S-Stephen/08d46078fcc653fc56adc10563fd6705 to your computer and use it in GitHub Desktop.
python flake8 linting on file save VSC copy into .vscode/settings.json pip install flake8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"python.linting.pylintEnabled": false, | |
"python.linting.flake8Enabled": true, | |
"python.linting.flake8Args": ["--ignore=E24,W504", "--verbose"], | |
"python.linting.enabled": true, | |
"python.lintOnSave": true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To run the linting before commit and before it is run in your github action, add this config to your VSCode settings file:
In the root directory (top level folder) of your repository this into your VScode settings file (.vscode/settings.json)
You will need to install flake8 (one of?);
Everytime you save a python file linting will be checked (see 'PROBLEMS' tab in the terminal window), clear these issue before commiting / pushing your files - no more flake8 errors in your github actions!
Further reading: https://code.visualstudio.com/docs/python/linting