You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a project of mine, there is an entire directory, "dummy", that I want to exclude running pylint in. I've added the directory name to the "ignore" option and it works great when used from the command line.
# Files or directories to be skipped. They should be base names, not paths.ignore = [
'dummy',
]
However, when using vscode, the full path is provided. It calls pylint like this:
In this case, the ignore rule doesn't work and vscode still reports errors. So I decided to switch to the "ignore-paths" option. The following works:
# Add files or directories matching the regex patterns to the ignore-list. The# regex matches against paths.ignore-paths = [
'.*/dummy/.*$',
'.*\\dummy\\.*$',
]
However, I need to duplciate each path, onces for Linux (/ as path separator) and the second for Windows (\ as path separator). Would it be possible to normalize the paths (could use pathlib PosixPath) so that just the linux one would work on both systems? Note also that vscode passes the full path, so starting the regex with a ^, like '^dummy/.*$', won't work.
Desired solution
I'd like to be able to define the path only once in the "ignore-paths" settings. Even better would be to respect the "ignore" setting even for a path provided with the full path (just as if it was run from the command line).
# Add files or directories matching the regex patterns to the ignore-list. The# regex matches against paths.ignore-paths = [
'.*/dummy/.*$',
]
Additional context
No response
The text was updated successfully, but these errors were encountered:
Current problem
In a project of mine, there is an entire directory, "dummy", that I want to exclude running pylint in. I've added the directory name to the "ignore" option and it works great when used from the command line.
However, when using vscode, the full path is provided. It calls pylint like this:
In this case, the ignore rule doesn't work and vscode still reports errors. So I decided to switch to the "ignore-paths" option. The following works:
However, I need to duplciate each path, onces for Linux (/ as path separator) and the second for Windows (\ as path separator). Would it be possible to normalize the paths (could use pathlib PosixPath) so that just the linux one would work on both systems? Note also that vscode passes the full path, so starting the regex with a ^, like '^dummy/.*$', won't work.
Desired solution
I'd like to be able to define the path only once in the "ignore-paths" settings. Even better would be to respect the "ignore" setting even for a path provided with the full path (just as if it was run from the command line).
Additional context
No response
The text was updated successfully, but these errors were encountered: