Skip to content

Commit

Permalink
Remove --ignore-checks from cfn-lint (#145)
Browse files Browse the repository at this point in the history
* Remove ignore checks

* Fix the inconsistency

* Bump Python and Ruby versions

* Update pre-commit

* Update GitHub actions
  • Loading branch information
rezabekf authored Feb 4, 2022
1 parent 9f06727 commit c409862
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ jobs:
restore-keys: |
# Setup
- name: Set up Python 3.7
uses: actions/setup-python@v1
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: '3.10' # have to use quotes due to 0 being removed
- name: Install python packages
run: pip install -Ur requirements.txt
- name: Set up ruby 2.6
uses: actions/setup-ruby@v1
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
ruby-version: 3.1
- name: Install Ruby gems
run: gem install cfn-nag

# Run Tests
- name: CloudFormation lint test
run: cfn-lint code/solutions/*.yaml
run: cfn-lint code/solutions/**/*.yaml --ignore-templates code/solutions/policy-as-code-with-guard/example_bucket_tests.yaml
- name: CloudFormation nag test
run: cfn_nag_scan --input-path code/solutions --ignore-fatal
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ repos:

# General
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.1.0
hooks:
- id: check-case-conflict
- id: detect-private-key
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
args:
- --fix=lf
- --fix=lf
exclude: /package-lock\.json$
- id: check-added-large-files
args:
- --maxkb=1000
- --maxkb=1000
- id: check-merge-conflict

# Secrets
Expand All @@ -30,13 +30,13 @@ repos:

# CloudFormation
- repo: https://github.com/aws-cloudformation/cfn-python-lint
rev: v0.54.3
rev: v0.58.0
hooks:
- id: cfn-python-lint
name: AWS CloudFormation Linter
files: solutions/.*\.(yaml)$
args: [--ignore-checks=W3002]
exclude: code/solutions/policy-as-code-with-guard/example_bucket_tests.yaml
args:
- --ignore-templates=code/solutions/policy-as-code-with-guard/example_bucket_tests.yaml

- repo: https://github.com/aws-cloudformation/rain
rev: v1.2.0
Expand All @@ -47,19 +47,19 @@ repos:

# Python
- repo: https://github.com/pycqa/pylint
rev: v2.11.1
rev: v2.12.2
hooks:
- id: pylint
args:
- --errors-only
- --disable=E0401

- repo: https://github.com/PyCQA/isort
rev: 5.9.3
rev: 5.10.1
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 21.9b0
rev: 22.1.0
hooks:
- id: black

0 comments on commit c409862

Please sign in to comment.