summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/check-webkit-style
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/Scripts/check-webkit-style')
-rwxr-xr-xWebKitTools/Scripts/check-webkit-style15
1 files changed, 8 insertions, 7 deletions
diff --git a/WebKitTools/Scripts/check-webkit-style b/WebKitTools/Scripts/check-webkit-style
index 501264b..ea2e943 100755
--- a/WebKitTools/Scripts/check-webkit-style
+++ b/WebKitTools/Scripts/check-webkit-style
@@ -57,13 +57,11 @@ def main():
codecs.getreader('utf8'),
codecs.getwriter('utf8'),
'replace')
-
- defaults = checker.webkit_argument_defaults()
-
- parser = checker.ArgumentParser(defaults)
+ parser = checker.check_webkit_style_parser()
(files, options) = parser.parse(sys.argv[1:])
- style_checker = checker.StyleChecker(options)
+ configuration = checker.check_webkit_style_configuration(options)
+ style_checker = checker.StyleChecker(configuration)
if files:
for filename in files:
@@ -87,8 +85,11 @@ def main():
style_checker.check_patch(patch)
error_count = style_checker.error_count
- sys.stderr.write('Total errors found: %d\n' % error_count)
- sys.exit(error_count > 0)
+ file_count = style_checker.file_count
+ sys.stderr.write('Total errors found: %d in %d files\n'
+ % (error_count, file_count))
+ # We fail when style errors are found or there are no checked files.
+ sys.exit(error_count > 0 or file_count == 0)
if __name__ == "__main__":