diff --git a/cpplint.py b/cpplint.py index 8a85c9e48..04b99cbc4 100755 --- a/cpplint.py +++ b/cpplint.py @@ -6004,14 +6004,16 @@ def ParseArguments(args): """ try: (opts, filenames) = getopt.getopt(args, '', ['help', 'output=', 'verbose=', + 'headers=', # We understand but ignore headers. 'counting=', 'filter=', 'root=', 'linelength=', 'extensions=', - 'project_root=']) - except getopt.GetoptError: - PrintUsage('Invalid arguments.') + 'project_root=', + 'repository=']) + except getopt.GetoptError as e: + PrintUsage('Invalid arguments: {}'.format(e)) verbosity = _VerboseLevel() output_format = _OutputFormat() @@ -6038,7 +6040,7 @@ def ParseArguments(args): elif opt == '--root': global _root _root = val - elif opt == '--project_root': + elif opt == '--project_root' or opt == "--repository": global _project_root _project_root = val if not os.path.isabs(_project_root):