secularbird / cpplint-extension

vscode cpplint extension
MIT License
22 stars 12 forks source link

Exclude file filter #15

Closed 0ge closed 6 years ago

0ge commented 6 years ago

I tried excluding my test files with the following setting, but its still linting my test files. (They are all located in the folder test/ and have a prefix of test_ and an extension .cpp)

"cpplint.excludes": [
         "test/test_*.cpp"
     ]

If I run cpplint --exclude=test/test_*.cpp test/* I only get warnings for files not matching the pattern (e.g. mocks).

Am I doing something wrong here?

secularbird commented 6 years ago

We had got supported for multiroot workspace, related path is not supported now , you should use a absolute path.

0ge commented 6 years ago

Thanks, that works! Can we convert this to a feature request to support general patterns? For instance, most my projects would contain a test directory that I don't bother to lint. You can otherwise close this issue. (Sorry, not too involved in what a multi root workspace means)

secularbird commented 6 years ago

I think I could add a feature, when exclude path is a relative path, the is will fit for all project root, if the path is absolute, then it is fit for only this path.

secularbird commented 6 years ago

I have commit the code, version 0.1.1 now supports relative path