Multiple wildcards (* or **) in same rule
sebastian-sommerfeld-io opened this issue · 2 comments
sebastian-sommerfeld-io commented
A .folderslintrc file that looks like this:
{
"rules": [
"docs/modules/*/assets/attachments/**",
"docs/modules/*/assets/images/**",
"docs/modules/*/examples/*",
"docs/modules/*/examples/**",
"docs/modules/*/pages/*",
"docs/modules/*/pages/**",
"docs/modules/*/partials/*",
"docs/modules/*/partials/**",
"resources/**",
"src/cicd/**",
"src/main/**",
"src/test/**",
"node_modules/**",
"target/**"
]
}
results in false positives. The directory "docs/modules/ROOT/assets/images" contains the folder "workstations/kobol" (full path = docs/modules/ROOT/assets/images/workstations/kobol). The rule "docs/modules/*/assets/images/**" states that this folder is allowed. But still running the linter results in this message (which is a false positive).
/home/vagrant/work/repos/sebastian-sommerfeld-io/infrastructure/docs/modules/ROOT/assets/images/workstations/kobol
error Directory is not allowed by config
Expected behavior is that this directory is not marked as error but is accepted and marked as allowed.
Actual behavior is that the directory is marked as error.
denisraslov commented
Thank you!
Fixed in the release 1.2.0.
sebastian-sommerfeld-io commented
I can confirm that the bug is fixed. Folderslint 1.2.0 works as expected. Thanks for your help.