question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does not lint deeply nested template paths

See original GitHub issue

cfn-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:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
phenecommented, Sep 2, 2020

This shouldn’t require bash to function. It should just work on systems that just have /bin/sh or use zsh.

1reaction
cmmeyercommented, Jan 3, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found