format-files icon indicating copy to clipboard operation
format-files copied to clipboard

Can't ignore folders as gitignore do

Open YuJianghao opened this issue 3 years ago • 3 comments

For example:

# .gitignore
node_modules

After enable formatFiles.useGitIgnore:

/myrepo/node_modules/blabla: ignored as expected.

/myrepo/packages/module-a/node_modules/blabla: BOOM!!!

Are there any solution for this?

YuJianghao avatar Jan 20 '22 18:01 YuJianghao

Seems formatFiles.useGitIgnore was deprecated?

config.useGitIgnore in src/ext/utilities/config.ts is never read.

YuJianghao avatar Jan 20 '22 19:01 YuJianghao

I can confirm this behaviour, not useful for big repositories. For me also the excludePattern is not working.

DanielHabenicht avatar May 19 '22 11:05 DanielHabenicht

I also see the same issues as reported. (Both useGitIgnore + excludedFolders NOT working!) So this setting don't work to exclude the folder named "static":

"formatFiles.excludedFolders": [
    "static"
]

But this can still be done by using excludePattern like this:

"formatFiles.excludePattern": "**/static/**", 

stenaksel avatar Jul 09 '23 15:07 stenaksel