microsoft / vscode-flake8

Linting support for python using the flake8 library.
https://marketplace.visualstudio.com/items?itemName=ms-python.flake8
MIT License
40 stars 30 forks source link

flake8.ignorePatterns does not exclude files #253

Closed Booth-Transport closed 10 months ago

Booth-Transport commented 10 months ago

I'm trying to exclude all sql scripts that I have in my project structure. All ending with extension sql i.e. mysqlfile1.sql. I want to exclude all of them from linting. I have the following in my settings.json file

"flake8.ignorePatterns": [
    ".sql"
]

It still does not exclude the files. I've also tried the following patterns and none of them work

"*.sql"
"*.sql*"
"*sql*"
"*sql"

My project structure is like below

Root

Other things does work though i.e. I've the following and it works

"flake8.args": [
    "--ignore=E501,E302,E305,E203,W391",
],
karthiknadig commented 10 months ago

@Booth-Transport Can you share logs for Output > flake8? We don't really trigger linting on sql files.

Booth-Transport commented 10 months ago

Thank you for pointing me to the right direction. The output for the sql errors were from mssql not flake8 when I checked the logs. They were all showing under PROBLEMS tab in VS Code. That's why I thought the were from flake8. My bad. Closing this issue