Add .md and .yaml exceptions to verify-flags-underscore.py.

Also removed duplicated exception checks for file extensions.
This commit is contained in:
Joe Finney
2015-12-07 16:33:27 -08:00
parent 929ab32865
commit ca3524639d
2 changed files with 4 additions and 16 deletions

View File

@@ -67,10 +67,6 @@ def get_all_files(rootdir):
files.remove('known-flags.txt')
for name in files:
if name.endswith(".svg"):
continue
if name.endswith(".gliffy"):
continue
pathname = os.path.join(root, name)
if is_binary(pathname):
continue
@@ -87,6 +83,10 @@ def normalize_files(rootdir, files):
continue
if f.endswith(".gliffy"):
continue
if f.endswith(".md"):
continue
if f.endswith(".yaml"):
continue
newfiles.append(f)
for i, f in enumerate(newfiles):
if not os.path.isabs(f):
@@ -106,9 +106,6 @@ 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
# something common in juju variables...
if "template_data[" + result + "]" in line:
return False