From 5e9617ed937d088945b6ac3e74de1448af5885c3 Mon Sep 17 00:00:00 2001 From: Kevin DeJong Date: Fri, 3 May 2024 10:58:09 -0700 Subject: [PATCH] Cleanup of some random things (#3209) * Some cleanup of code for migration --- .github/workflows/ci-branch.yaml | 6 +++--- .github/workflows/ci-pr.yaml | 6 +++--- pyproject.toml | 3 ++- src/cfnlint/maintenance.py | 1 - src/cfnlint/rules/resources/properties/StringLength.py | 2 +- .../schemas/providers/provider.definition.schema.v1.json | 7 +++++++ 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-branch.yaml b/.github/workflows/ci-branch.yaml index f2a2ec4d80..66afa84d2f 100644 --- a/.github/workflows/ci-branch.yaml +++ b/.github/workflows/ci-branch.yaml @@ -8,7 +8,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python: [ 3.8, 3.9, "3.10", "3.11", "3.12" ] + python: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] steps: - uses: actions/checkout@v4 @@ -38,7 +38,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python: [3.8] + python: ["3.10"] steps: - uses: actions/checkout@v4 - name: Setup Python @@ -57,7 +57,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python: [3.8] + python: ["3.10"] steps: - uses: actions/checkout@v4 - name: Setup Python diff --git a/.github/workflows/ci-pr.yaml b/.github/workflows/ci-pr.yaml index bc26f1a28c..05dac0afe7 100644 --- a/.github/workflows/ci-pr.yaml +++ b/.github/workflows/ci-pr.yaml @@ -8,7 +8,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python: [ 3.8, 3.9, "3.10", "3.11", "3.12" ] + python: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] steps: - uses: actions/checkout@v4 @@ -45,7 +45,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python: [3.8] + python: ["3.10"] steps: - uses: actions/checkout@v4 - name: Setup Python @@ -64,7 +64,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python: [3.8] + python: ["3.10"] steps: - uses: actions/checkout@v4 - name: Setup Python diff --git a/pyproject.toml b/pyproject.toml index cfab12144f..6f32c8ae7c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ name = "cfn-lint" description = "Checks CloudFormation templates for practices and behaviour that could potentially be improved" requires-python = ">=3.8" license = {text = "MIT no attribution"} -keywords = ["aws", "lint"] +keywords = ["aws", "cloudformation", "lint"] authors = [ {email = "kddejong@amazon.com"}, {name = "Kevin DeJong"}, @@ -32,6 +32,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] dynamic = ["version", "readme"] dependencies = [ diff --git a/src/cfnlint/maintenance.py b/src/cfnlint/maintenance.py index 1d8dabdf9c..5e61528610 100644 --- a/src/cfnlint/maintenance.py +++ b/src/cfnlint/maintenance.py @@ -81,7 +81,6 @@ def update_documentation(rules): cfnlint.rules.TransformError(), cfnlint.rules.RuleError(), ] + sorted_rules: - print(rule) rule_source_code_file = ( "../" + subprocess.check_output( diff --git a/src/cfnlint/rules/resources/properties/StringLength.py b/src/cfnlint/rules/resources/properties/StringLength.py index f278d26ad7..819ac11890 100644 --- a/src/cfnlint/rules/resources/properties/StringLength.py +++ b/src/cfnlint/rules/resources/properties/StringLength.py @@ -20,7 +20,7 @@ class StringLength(CloudFormationLintRule): id = "E3033" shortdesc = "Check if a string has between min and max number of values specified" description = "Check strings for its length between the minimum and maximum" - source_url = "https://github.com/aws-cloudformation/cfn-lint/blob/v1/docs/cfn-schema-specification.md#length" + source_url = "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#length" tags = ["resources", "property", "string", "size"] def _serialize_date(self, obj): diff --git a/test/fixtures/schemas/providers/provider.definition.schema.v1.json b/test/fixtures/schemas/providers/provider.definition.schema.v1.json index 90100b399d..4ecee52d6e 100644 --- a/test/fixtures/schemas/providers/provider.definition.schema.v1.json +++ b/test/fixtures/schemas/providers/provider.definition.schema.v1.json @@ -152,6 +152,13 @@ "description": "A reference to the Tags property in the schema.", "$ref": "http://json-schema.org/draft-07/schema#/properties/$ref", "default": "/properties/Tags" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + }, + "additionalItems": false } }, "required": [