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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/style/main.py

Issue 2256793002: Make docstrings more consistent using format-webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make indentation of final quote based on parse tree (indentation prior to docstring node) rather th… Created 4 years, 3 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) 2010 Chris Jerdonek (cjerdonek@webkit.org) 1 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
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 4 # modification, are permitted provided that the following conditions
5 # are met: 5 # are met:
6 # 1. Redistributions of source code must retain the above copyright 6 # 1. Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # 2. Redistributions in binary form must reproduce the above copyright 8 # 2. Redistributions in binary form must reproduce the above copyright
9 # notice, this list of conditions and the following disclaimer in the 9 # notice, this list of conditions and the following disclaimer in the
10 # documentation and/or other materials provided with the distribution. 10 # documentation and/or other materials provided with the distribution.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 paths: A copy of the paths parameter -- possibly converted, as follows. 50 paths: A copy of the paths parameter -- possibly converted, as follows.
51 If this method changed the current working directory to the 51 If this method changed the current working directory to the
52 checkout root, then the list is the paths parameter converted to 52 checkout root, then the list is the paths parameter converted to
53 normalized paths relative to the checkout root. 53 normalized paths relative to the checkout root.
54 54
55 Args: 55 Args:
56 paths: A list of paths to the files that should be checked for style. 56 paths: A list of paths to the files that should be checked for style.
57 This argument can be None or the empty list if a git commit 57 This argument can be None or the empty list if a git commit
58 or all changes under the checkout root should be checked. 58 or all changes under the checkout root should be checked.
59 checkout_root: The path to the root of the WebKit checkout. 59 checkout_root: The path to the root of the WebKit checkout.
60
61 """ 60 """
62 if paths is not None: 61 if paths is not None:
63 paths = list(paths) 62 paths = list(paths)
64 63
65 if paths: 64 if paths:
66 # Then try converting all of the paths to paths relative to 65 # Then try converting all of the paths to paths relative to
67 # the checkout root. 66 # the checkout root.
68 rel_paths = [] 67 rel_paths = []
69 for path in paths: 68 for path in paths:
70 rel_path = filesystem.relpath(path, checkout_root) 69 rel_path = filesystem.relpath(path, checkout_root)
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 patch_checker = PatchReader(file_reader) 153 patch_checker = PatchReader(file_reader)
155 patch_checker.check(patch) 154 patch_checker.check(patch)
156 155
157 error_count = style_processor.error_count 156 error_count = style_processor.error_count
158 file_count = file_reader.file_count 157 file_count = file_reader.file_count
159 delete_only_file_count = file_reader.delete_only_file_count 158 delete_only_file_count = file_reader.delete_only_file_count
160 159
161 _log.info("Total errors found: %d in %d files", error_count, file_count) 160 _log.info("Total errors found: %d in %d files", error_count, file_count)
162 # We fail when style errors are found or there are no checked files. 161 # We fail when style errors are found or there are no checked files.
163 return error_count > 0 or (file_count == 0 and delete_only_file_count == 0) 162 return error_count > 0 or (file_count == 0 and delete_only_file_count == 0)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698