-
Notifications
You must be signed in to change notification settings - Fork 596
/
Description.py
31 lines (26 loc) · 1012 Bytes
/
Description.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""
import cfnlint.data.schemas.other.template
from cfnlint.rules import CfnLintJsonSchema, SchemaDetails
class Description(CfnLintJsonSchema):
"""Check Template Description is only a String"""
id = "E1004"
shortdesc = "Template description can only be a string"
description = "Template description can only be a string"
source_url = "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-description-structure.html"
tags = ["description"]
def __init__(self) -> None:
super().__init__(
keywords=["Description"],
schema_details=SchemaDetails(
cfnlint.data.schemas.other.template,
"description.json",
),
all_matches=True,
)
self.rule_set = {
"maxLength": "E1003",
}
self.child_rules = dict.fromkeys(list(self.rule_set.values()))