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

Side by Side Diff: PRESUBMIT.py

Issue 779383004: Add presubmit to ensure GN formatting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 gcl. 8 for more details about the presubmit API built into gcl.
9 """ 9 """
10 10
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after
1561 else: 1561 else:
1562 return [] 1562 return []
1563 1563
1564 1564
1565 def CheckChangeOnUpload(input_api, output_api): 1565 def CheckChangeOnUpload(input_api, output_api):
1566 results = [] 1566 results = []
1567 results.extend(_CommonChecks(input_api, output_api)) 1567 results.extend(_CommonChecks(input_api, output_api))
1568 results.extend(_CheckValidHostsInDEPS(input_api, output_api)) 1568 results.extend(_CheckValidHostsInDEPS(input_api, output_api))
1569 results.extend(_CheckJavaStyle(input_api, output_api)) 1569 results.extend(_CheckJavaStyle(input_api, output_api))
1570 results.extend(_CheckUmaHistogramChanges(input_api, output_api)) 1570 results.extend(_CheckUmaHistogramChanges(input_api, output_api))
1571 results.extend(
1572 input_api.canned_checks.CheckGNFormatted(input_api, output_api))
1571 return results 1573 return results
1572 1574
1573 1575
1574 def GetTryServerMasterForBot(bot): 1576 def GetTryServerMasterForBot(bot):
1575 """Returns the Try Server master for the given bot. 1577 """Returns the Try Server master for the given bot.
1576 1578
1577 It tries to guess the master from the bot name, but may still fail 1579 It tries to guess the master from the bot name, but may still fail
1578 and return None. There is no longer a default master. 1580 and return None. There is no longer a default master.
1579 """ 1581 """
1580 # Potentially ambiguous bot names are listed explicitly. 1582 # Potentially ambiguous bot names are listed explicitly.
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1785 ] 1787 ]
1786 1788
1787 # Match things like path/aura/file.cc and path/file_aura.cc. 1789 # Match things like path/aura/file.cc and path/file_aura.cc.
1788 # Same for chromeos. 1790 # Same for chromeos.
1789 if any(re.search(r'[\\\/_](aura|chromeos)', f) for f in files): 1791 if any(re.search(r'[\\\/_](aura|chromeos)', f) for f in files):
1790 builders.extend([ 1792 builders.extend([
1791 'linux_chromeos_asan', 1793 'linux_chromeos_asan',
1792 ]) 1794 ])
1793 1795
1794 return GetDefaultTryConfigs(builders) 1796 return GetDefaultTryConfigs(builders)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698