match-dir does not include files in subdirectories
See original GitHub issueLet’s say I use an option --match-dir='^src'
and have a folder src and I want to match everything inside this folder including files in subfolders, currently it skips all files inside subfolders
Issue Analytics
- State:
- Created 4 years ago
- Reactions:10
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to filter directories using the match-dir flag for pydocstyle?
Both methods appear to have no impact on the directories that are checked when pre-commit is run and pydocstyle checks all files in...
Read more >How can I use a wildcard to match just files, not directories?
The question to exclude directories is a bit less simple; I propose to use the find -type f command. (I'll provide details on...
Read more >Dir Function - Microsoft Support
String expression that specifies a file name — may include directory or folder, and drive. A zero-length string ("") is returned if pathname...
Read more >node-dir - npm
A lightweight Node.js module with methods for some common directory and file operations, including asynchronous, non-blocking methods for recursively ...
Read more >Open excel files in Folder and Copy | MrExcel Message Board
MyFile = Dir() changes the filepath to next filepathname? what does the Dir() part do because i have set no arguments so how...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The only thing I could get to work was excluding directories by following the example here. I also could not figure out how to use a positive filter.
Has there been any developments with matching directories using
--match-dir
? I would like to exclude all directories except for the directories mentioned in--match-dir
.Currently, I am trying to pass
--match-dir
as an argument to pydocstyle when using it as a pre-commit hook, however, it seems to not exclude directories and instead includes all directories.An example of my
.pre-commit-config.yaml
file:Solution
Pre-commit can restrict the files that are passed to pydocstyle using the files key, for example: