diff --git a/panc/src/main/scripts/panlint/panlint.py b/panc/src/main/scripts/panlint/panlint.py index 7407e6e5..0e2dc7ff 100755 --- a/panc/src/main/scripts/panlint/panlint.py +++ b/panc/src/main/scripts/panlint/panlint.py @@ -92,7 +92,7 @@ def diagnose(self): "Use dicts instead of nlists": re.compile(r'\b(?P(?:is_)?nlist)\s*\('), "Include statements no longer need curly braces": re.compile(r'''include\s+(?P{[^;]+})'''), "Line is longer than %s characters" % LINE_LENGTH_LIMIT: - re.compile(r'''^.{0,%s}(?P.*?)$''' % LINE_LENGTH_LIMIT), + re.compile(r'''^(?!bind ).{0,%s}(?P.*?)$''' % LINE_LENGTH_LIMIT), "Commas should be followed by exactly one space": re.compile(r'(?P,(?:\S|\s{2,}))'), "Whitespace before semicolon": re.compile(r'(?P\s+;)'), "Semicolons should be followed exactly one space or end-of-line": re.compile(r';(?P(?:\S|\s{2,}))'), diff --git a/panc/src/main/scripts/panlint/tests.py b/panc/src/main/scripts/panlint/tests.py index 68d14f14..5a66c9d3 100755 --- a/panc/src/main/scripts/panlint/tests.py +++ b/panc/src/main/scripts/panlint/tests.py @@ -482,6 +482,8 @@ def test_check_line_patterns(self): ('error("is_asndate: invalid format for time");', []), ('debug(format("%s: bar: %s", OBJECT, ARGV[0]));', ['Redundant use of format within error or debug call']), ('debug("Foo" + bar + " has an unexpected format (should be a dict)");', []), + ('"/software/components/metaconfig/services/{/etc/example_service_with_long_name/conf.d/dropin_config.cfg}/contents/foo" = "bar";', ['Line is longer than 120 characters']), + ('bind "/software/components/metaconfig/services/{/etc/example_service_with_long_name/conf.d/dropin_config.cfg}/contents" = type_example_service;', []), ] for text, messages in lines: