Tuesday, March 31, 2020

Django lint in Visual Studio Code

In C:\Users\[user name]\AppData\Roaming\Code\User\settings.json,
apply orange highlight.


{
    "diffEditor.ignoreTrimWhitespace": false,
    "window.zoomLevel": 3,
    "editor.tabSize": 2,
    "editor.insertSpaces": false,
    "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
    "[python]": {},
    "python.linting.pylintPath": "D:\\dvp\\project\\env\\Scripts\\pylint",
    "editor.minimap.enabled": false,
    "python.linting.pylintArgs": [
        "--load-plugins", "pylint_django"
    ]
,

    "python.linting.flake8CategorySeverity.E": "Information",
    "python.linting.pydocstyleEnabled": true
}



For a project, the setting is in .vscode folder:

{
    "python.pythonPath": "env\\Scripts\\python.exe",
    "python.linting.enabled": true,
    "python.linting.banditEnabled": false,
    "python.linting.pydocstyleEnabled": false,
    "python.linting.pylintEnabled": true,
    "python.linting.flake8Enabled": false
}

No comments: