Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations.py

Issue 1783073002: Run auto-formatter on files in webkitpy/layout_tests/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (C) 2012 Google Inc. All rights reserved. 1 # Copyright (C) 2012 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 failures = [] 54 failures = []
55 for port_to_lint in ports_to_lint: 55 for port_to_lint in ports_to_lint:
56 expectations_dict = port_to_lint.expectations_dict() 56 expectations_dict = port_to_lint.expectations_dict()
57 57
58 for expectations_file in expectations_dict.keys(): 58 for expectations_file in expectations_dict.keys():
59 if expectations_file in files_linted: 59 if expectations_file in files_linted:
60 continue 60 continue
61 61
62 try: 62 try:
63 test_expectations.TestExpectations(port_to_lint, 63 test_expectations.TestExpectations(port_to_lint,
64 expectations_dict={expectations_file: expectations_dict[expe ctations_file]}, 64 expectations_dict={expectatio ns_file: expectations_dict[expectations_file]},
65 is_lint_mode=True) 65 is_lint_mode=True)
66 except test_expectations.ParseError as e: 66 except test_expectations.ParseError as e:
67 _log.error('') 67 _log.error('')
68 for warning in e.warnings: 68 for warning in e.warnings:
69 _log.error(warning) 69 _log.error(warning)
70 failures.append('%s: %s' % (expectations_file, warning)) 70 failures.append('%s: %s' % (expectations_file, warning))
71 _log.error('') 71 _log.error('')
72 files_linted.add(expectations_file) 72 files_linted.add(expectations_file)
73 return failures 73 return failures
74 74
75 75
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 try: 142 try:
143 exit_status = run_checks(host, options, stderr) 143 exit_status = run_checks(host, options, stderr)
144 except KeyboardInterrupt: 144 except KeyboardInterrupt:
145 exit_status = INTERRUPTED_EXIT_STATUS 145 exit_status = INTERRUPTED_EXIT_STATUS
146 except Exception as e: 146 except Exception as e:
147 print >> stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e)) 147 print >> stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e))
148 traceback.print_exc(file=stderr) 148 traceback.print_exc(file=stderr)
149 exit_status = EXCEPTIONAL_EXIT_STATUS 149 exit_status = EXCEPTIONAL_EXIT_STATUS
150 150
151 return exit_status 151 return exit_status
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698