Skip to content

Commit 30ee387

Browse files
V1 - Update to switch to CloudFormation provider schemas (#2583)
* Convert to using CloudFormation provider schemas * Many rule changes and API changes as we converted from specs to schemas --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 10b6a8b commit 30ee387

File tree

4,950 files changed

+864941
-796638
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,950 files changed

+864941
-796638
lines changed

.coveragerc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/1.bug_report.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ body:
99
1010
For reference, the current version of cfn-lint is <img src="https://badge.fury.io/py/cfn-lint.svg" />.
1111
12-
Cfn-lint uses the [CloudFormation Resource Specifications](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification.html) as the base to do validation. These files are included as part of the application version. Please update to the latest version of `cfn-lint` or update the spec files manually (`cfn-lint -u`)
12+
Cfn-lint uses the [CloudFormation resource provider schemas](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-type-schemas.html) as the base to do validation. These files are included as part of the application version. Please update to the latest version of `cfn-lint` or update the spec files manually (`cfn-lint -u`)
1313
- type: input
1414
attributes:
1515
label: CloudFormation Lint Version

.github/workflows/cd-pypi.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ jobs:
1515
python-version: "3.x"
1616
- name: Install dependencies
1717
run: |
18-
pip install --upgrade setuptools wheel twine
18+
pip install --upgrade pip
19+
pip install --upgrade setuptools build wheel twine
1920
- name: Build and publish
2021
run: |
21-
python setup.py sdist bdist_wheel
22+
python -m build
2223
- name: Publish to PyPI
2324
uses: pypa/gh-action-pypi-publish@release/v1
2425
with:

.github/workflows/ci-branch.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ jobs:
1818
python-version: ${{ matrix.python }}
1919
- name: Install Tox and any other packages
2020
run: pip install tox
21+
- name: Run Lint
22+
run: |
23+
pip install pre-commit
24+
pre-commit run --all-files
2125
- name: Run Tox
2226
run: |
23-
tox -e style
24-
tox -e type
25-
tox -e py
26-
- uses: codecov/[email protected]
27+
tox -e py -- -m "data or not data"
28+
- uses: codecov/[email protected]
2729
if: matrix.os == 'ubuntu-latest'
2830
with:
2931
token: ${{ secrets.CODECOV_TOKEN }}
@@ -71,3 +73,4 @@ jobs:
7173
with:
7274
ignore-vulns: |
7375
GHSA-r9hx-vwmv-q579
76+
PYSEC-2022-43012

.github/workflows/ci-pr.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ jobs:
1818
python-version: ${{ matrix.python }}
1919
- name: Install Tox and any other packages
2020
run: pip install tox
21+
- name: Run Lint
22+
run: |
23+
pip install pre-commit
24+
pre-commit run --all-files
2125
- name: Run Tox
2226
run: |
23-
tox -e style
24-
tox -e type
25-
tox -e py
27+
tox -e py -- -m "data or not data"
2628
mv coverage.xml coverage-${{ matrix.python }}.xml
2729
- name: Store coverage file
2830
uses: actions/upload-artifact@v4
@@ -78,3 +80,4 @@ jobs:
7880
with:
7981
ignore-vulns: |
8082
GHSA-r9hx-vwmv-q579
83+
PYSEC-2022-43012

.github/workflows/maintenance-v0.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/setup-python@v5
1414
with:
1515
python-version: 3
16-
-
16+
-
1717
id: maintenance
1818
run: |
1919
latest_sam_cli=`curl -s https://api.github.com/repos/aws/aws-sam-cli/releases/latest | jq -r .tag_name | cut -c 2-`
@@ -26,6 +26,7 @@ jobs:
2626
scripts/update_specs_services_from_ssm.py
2727
scripts/update_specs_from_pricing.py
2828
scripts/update_serverless_aws_policies.py
29+
scripts/update_schemas_from_aws_api.py
2930
cfn-lint --update-specs
3031
echo "specversion=$(jq -r .ResourceSpecificationVersion src/cfnlint/data/CloudSpecs/us-east-1.json)" >> $GITHUB_OUTPUT
3132
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
@@ -40,7 +41,7 @@ jobs:
4041
body: |
4142
- Update CloudFormation specs to ${{ steps.maintenance.outputs.specversion }}
4243
- Update Specs from pricing data as of ${{ steps.maintenance.outputs.date }}
43-
44+
4445
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
4546
delete-branch: true
4647
title: chore(specs) - Update CloudFormation specs to ${{ steps.maintenance.outputs.specversion }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ htmlcov/
4949
.coverage
5050
.coverage.*
5151
.cache
52+
.pytest_cache/
53+
.ruff_cache/
5254
nosetests.xml
5355
coverage.xml
5456
*.cover

.pre-commit-config.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: check-ast
6+
- id: check-json
7+
exclude: "(test/fixtures/templates/bad/json_parse.json|test/fixtures/templates/bad/core/config_invalid_json.json|test/fixtures/templates/bad/duplicate.json)"
8+
- id: check-toml
9+
- id: check-vcs-permalinks
10+
- id: check-yaml
11+
exclude: "test/fixtures/templates/"
12+
args: [--unsafe]
13+
- id: debug-statements
14+
- id: end-of-file-fixer
15+
- id: mixed-line-ending
16+
args: [--fix, auto]
17+
- id: trailing-whitespace
18+
- repo: https://github.com/psf/black
19+
rev: 24.2.0
20+
hooks:
21+
- id: black
22+
- repo: https://github.com/PyCQA/isort
23+
rev: 5.13.2
24+
hooks:
25+
- id: isort
26+
- repo: https://github.com/charliermarsh/ruff-pre-commit
27+
rev: "v0.2.2"
28+
hooks:
29+
- id: ruff
30+
- repo: https://github.com/PyCQA/bandit
31+
rev: "1.7.7"
32+
hooks:
33+
- id: bandit
34+
additional_dependencies:
35+
- "bandit[toml]"
36+
args: ["-c", "pyproject.toml"]
37+
- repo: https://github.com/pre-commit/mirrors-mypy
38+
rev: "v1.8.0"
39+
hooks:
40+
- id: mypy
41+
additional_dependencies:
42+
- "types-PyYAML"
43+
- "types-regex"
44+
- "types-requests"

0 commit comments

Comments
 (0)