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

Side by Side Diff: PRESUBMIT.py

Issue 1956893002: Added brotli enc/ and tools/ directories. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split large file into 2, fixed Windows build issue Created 4 years, 7 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 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Top-level presubmit script for Chromium. 5 """Top-level presubmit script for Chromium.
6 6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details about the presubmit API built into depot_tools. 8 for more details about the presubmit API built into depot_tools.
9 """ 9 """
10 10
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 sys.path = original_sys_path 682 sys.path = original_sys_path
683 683
684 added_includes = [] 684 added_includes = []
685 for f in input_api.AffectedFiles(): 685 for f in input_api.AffectedFiles():
686 if not CppChecker.IsCppFile(f.LocalPath()): 686 if not CppChecker.IsCppFile(f.LocalPath()):
687 continue 687 continue
688 688
689 changed_lines = [line for line_num, line in f.ChangedContents()] 689 changed_lines = [line for line_num, line in f.ChangedContents()]
690 added_includes.append([f.LocalPath(), changed_lines]) 690 added_includes.append([f.LocalPath(), changed_lines])
691 691
692 deps_checker = checkdeps.DepsChecker(input_api.PresubmitLocalPath()) 692 deps_checker = checkdeps.DepsChecker(input_api.PresubmitLocalPath(),
693 resolve_dotdot=True)
693 694
694 error_descriptions = [] 695 error_descriptions = []
695 warning_descriptions = [] 696 warning_descriptions = []
696 for path, rule_type, rule_description in deps_checker.CheckAddedCppIncludes( 697 for path, rule_type, rule_description in deps_checker.CheckAddedCppIncludes(
697 added_includes): 698 added_includes):
698 description_with_path = '%s\n %s' % (path, rule_description) 699 description_with_path = '%s\n %s' % (path, rule_description)
699 if rule_type == Rule.DISALLOW: 700 if rule_type == Rule.DISALLOW:
700 error_descriptions.append(description_with_path) 701 error_descriptions.append(description_with_path)
701 else: 702 else:
702 warning_descriptions.append(description_with_path) 703 warning_descriptions.append(description_with_path)
(...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after
2125 results.extend(input_api.canned_checks.CheckTreeIsOpen( 2126 results.extend(input_api.canned_checks.CheckTreeIsOpen(
2126 input_api, 2127 input_api,
2127 output_api, 2128 output_api,
2128 json_url='http://chromium-status.appspot.com/current?format=json')) 2129 json_url='http://chromium-status.appspot.com/current?format=json'))
2129 2130
2130 results.extend(input_api.canned_checks.CheckChangeHasBugField( 2131 results.extend(input_api.canned_checks.CheckChangeHasBugField(
2131 input_api, output_api)) 2132 input_api, output_api))
2132 results.extend(input_api.canned_checks.CheckChangeHasDescription( 2133 results.extend(input_api.canned_checks.CheckChangeHasDescription(
2133 input_api, output_api)) 2134 input_api, output_api))
2134 return results 2135 return results
OLDNEW
« no previous file with comments | « DEPS ('k') | third_party/brotli/.gitignore » ('j') | third_party/brotli/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698