src/clint.py: improve "Ignoring" message

It was a bit confusing for me when seeing it myself the first time.

[ci skip]
This commit is contained in:
Daniel Hahler 2017-01-13 22:19:47 +01:00
parent f686635420
commit 0aa1cff604

View File

@ -3434,8 +3434,9 @@ def ProcessFile(filename, vlevel, extra_check_functions=[]):
# When reading from stdin, the extension is unknown, so no cpplint tests # When reading from stdin, the extension is unknown, so no cpplint tests
# should rely on the extension. # should rely on the extension.
if filename != '-' and file_extension not in _valid_extensions: if filename != '-' and file_extension not in _valid_extensions:
sys.stderr.write('Ignoring %s; not a valid file name ' sys.stderr.write('Ignoring {}; only linting {} files\n'.format(
'(%s)\n' % (filename, ', '.join(_valid_extensions))) filename,
', '.join('.{}'.format(ext) for ext in _valid_extensions)))
else: else:
ProcessFileData(filename, file_extension, lines, Error, ProcessFileData(filename, file_extension, lines, Error,
extra_check_functions) extra_check_functions)