Merge pull request #24 from PeterMosmans/validation
Show filename when threatLevel is incorrect
This commit is contained in:
@@ -354,8 +354,8 @@ def validate_type(tree, filename, options, speller):
|
|||||||
else:
|
else:
|
||||||
if attribute == 'threatLevel' and root.attrib[attribute] not in \
|
if attribute == 'threatLevel' and root.attrib[attribute] not in \
|
||||||
('Low', 'Moderate', 'Elevated', 'High', 'Extreme'):
|
('Low', 'Moderate', 'Elevated', 'High', 'Extreme'):
|
||||||
print('[-] threatLevel is not Low, Moderate, High, Elevated or Extreme: {0}'.
|
print('[-] threatLevel is not Low, Moderate, High, Elevated or Extreme: {0} {1}'.
|
||||||
format(root.attrib[attribute]))
|
format(filename, root.attrib[attribute]))
|
||||||
result = False
|
result = False
|
||||||
if attribute == 'type' and (options['capitalization'] and not \
|
if attribute == 'type' and (options['capitalization'] and not \
|
||||||
is_capitalized(root.attrib[attribute])):
|
is_capitalized(root.attrib[attribute])):
|
||||||
|
|||||||
Reference in New Issue
Block a user