Open pclausen opened 3 years ago
This is a pretty handy feature to have, thanks. IMO I think it is worth adding it in the include paths and include dirs as well, but ultimately that is @hansec 's call.
I should note though that there is a conversation to be had and a choice to be made here. glob.glob()
performs non-recursive pattern matching which might or might not be what the user wants depending on the underlying project. There might be cases where the recursive=True
is what is needed.
For example if you want to exclude all dir1
directories in the following directory structure
. ├── dir1 └── dir2 └── dir1 └── dir2
you would normally do something like
In [2]: glob.glob('**/dir1*', recursive=True)
Out[3]: ['dir1', 'dir2/dir1']
with the current implementation this will only exclude dir2/dir1
.
Good point. I'm fine with any version of wildcard.
First of all, I am so grateful for this project making my life in Fortran and VSCode so much better.
I was missing the feature of wildcards in
.fortls
file, mainlyexcl_paths
egThe change to allow this is line 200. I allowed myself also to change the
to
if dirName in self.excl_paths:
which I think reads better, but maybe the other implementation has a performance reason or something else I am not aware of.
I was not able to run all test successfully with my Python3.9 on Windows 10. I am getting these assertion errors which I do not how to cope with.