Does not lint deeply nested template paths
See original GitHub issuecfn-lint version: 0.9.2
Using **
path globs does not behave as expected. Assume the following directory structure
project:
templates:
- a:
- b:
- c:
- foo.yaml
- bar.yaml
- d:
- baz.yaml
- quux.yaml
- e:
- ipsum.yaml
- lorem.yaml
- f:
- zyx.yaml
- quuz.yaml
- main.yaml
If I use the glob format in .cfnlintrc
:
templates:
- project/templates/**/*.yaml
The only files that are checked are project/templates/f/zyx.yaml
and project/templates/f/quux.yaml
. All others are ignored. I would expect project/templates/**/*yaml
to match all deeply nested templates as well as project/templates/main.yaml
.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Does not lint deeply nested template paths · Issue #546 - GitHub
I like @kddejong's solution. Based on my research, getting recursive globbing working on 3.4 would require moving to something like pathlib.
Read more >Template literals should not be nested - SonarSource Rules
However, it's possible to build complex string literals by nesting together multiple template literals, and therefore lose readability and maintainability.
Read more >Linters | golangci-lint
Name Description Presets Since
asasalint ⚙️ check for pass any as any in variadic func(...any) bugs 1.47.0
bidichk ⚙️ Checks for dangerous unicode character sequences...
Read more >Link templates for deployment - Azure Resource Manager
For linked or nested templates, you can only set the deployment mode to Incremental. However, the main template can be deployed in complete...
Read more >Rules - ESLint - Pluggable JavaScript Linter
Disallow expressions where the operation doesn't affect the value ... Disallow characters which are made with multiple code points in character class syntax....
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
This shouldn’t require bash to function. It should just work on systems that just have
/bin/sh
or use zsh.I like @kddejong’s solution. Based on my research, getting recursive globbing working on 3.4 would require moving to something like pathlib. Adding
recursive=True
gets us compatibility back to 3.5 (which is pretty good) without the need for any significant code changes. I’m going to go ahead and approve it.