verify-flags-underscore.py: ignore if trailed by :

These are often yaml definitions, and thus not usages of kubernetes
flags.  Not necessarily always, but usually.
This commit is contained in:
Eric Paris
2015-08-14 15:28:03 -04:00
parent d1ba0bb692
commit f3fd2e1028
2 changed files with 3 additions and 24 deletions

View File

@@ -105,6 +105,9 @@ def line_has_bad_flag(line, flagre):
return False
if "grains" + result in line:
return False
# These are usually yaml definitions
if result.endswith(":"):
return False
return True
return False