From fc1db89eeb34ccfcefb3f2d1dcdb398120192f30 Mon Sep 17 00:00:00 2001 From: Alex Jurkiewicz Date: Tue, 16 Jul 2019 21:56:16 +1000 Subject: [PATCH] Surround example regex with single quotes YAML strings in double quotes use backslash as an escape character. Help out people copying and pasting from this error message into a YAML template by enclosing the example regex in single quotes instead. --- src/cfnlint/rules/parameters/Cidr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cfnlint/rules/parameters/Cidr.py b/src/cfnlint/rules/parameters/Cidr.py index e6178ed232..e2d76b9f6a 100644 --- a/src/cfnlint/rules/parameters/Cidr.py +++ b/src/cfnlint/rules/parameters/Cidr.py @@ -70,7 +70,7 @@ def check_cidr_ref(self, value, path, parameters, resources): param_path = ['Parameters', value] full_param_path = '/'.join(param_path) message = 'AllowedPattern and/or AllowedValues for Parameter should be specified at {1}. ' \ - 'Example for AllowedPattern: "{0}"' + 'Example for AllowedPattern: \'{0}\'' matches.append(RuleMatch(param_path, message.format(REGEX_CIDR.pattern, full_param_path))) return matches