Skip to content

Commit

Permalink
use globbing for cfn-lint, set ignore_templates
Browse files Browse the repository at this point in the history
seedfarmer manifest files no longer checked by cfn-lint
  • Loading branch information
cnfait committed Sep 24, 2024
1 parent 80566e8 commit 3f18f30
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .cfnlintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
ignore_templates:
- "*/deployspec.yaml"
- "sdlf-utils/workshop-examples/60-seedfarmer/manifest-sdlf*.yaml"
include_checks:
- I
ignore_checks:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/static-checking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
gem install cfn-nag
- name: cfn-lint
run: |
find . -type f -name '*.yaml' ! -name 'deployspec.yaml' -print0 \
| xargs -0 cfn-lint
shopt -s globstar
cfn-lint ./**/*.yaml
- name: cfn-nag
run: |
cat <<EOT >> .cfn-nag-deny-list.yml
Expand Down
4 changes: 2 additions & 2 deletions validate.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -ex
shopt -s globstar

# python
ruff format --check .
Expand All @@ -12,8 +13,7 @@ find . -type f \( -name '*.sh' -o -name '*.bash' -o -name '*.ksh' \) -print0 \
| xargs -0 shellcheck -x --format gcc

# cloudformation
find . -type f -name '*.yaml' ! -name 'deployspec.yaml' -print0 \
| xargs -0 cfn-lint
cfn-lint ./**/*.yaml

## unfortunately cfn_nag doesn't support fn::foreach so we exclude files using it: https://github.com/stelligent/cfn_nag/issues/621
find . -not \( -type f -name 'template-glue-job.yaml' -o -type f -name 'template-lambda-layer.yaml' \) -type f -name '*.yaml' -print0 \
Expand Down

0 comments on commit 3f18f30

Please sign in to comment.