OLD | NEW |
---|---|
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 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1533 'Found base::Singleton<T> in the following header files.\n' + | 1533 'Found base::Singleton<T> in the following header files.\n' + |
1534 'Please move them to an appropriate source file so that the ' + | 1534 'Please move them to an appropriate source file so that the ' + |
1535 'template gets instantiated in a single compilation unit.', | 1535 'template gets instantiated in a single compilation unit.', |
1536 files) ] | 1536 files) ] |
1537 return [] | 1537 return [] |
1538 | 1538 |
1539 | 1539 |
1540 def _CheckBaseMacrosInHeaders(input_api, output_api): | 1540 def _CheckBaseMacrosInHeaders(input_api, output_api): |
1541 """Check for base/macros.h if DISALLOW_* macro is used.""" | 1541 """Check for base/macros.h if DISALLOW_* macro is used.""" |
1542 | 1542 |
1543 disallows = ('DISALLOW_ASSIGN', 'DISALLOW_COPY', 'DISALLOW_EVIL') | 1543 disallows = ( |
1544 'DISALLOW_ASSIGN(', | |
1545 'DISALLOW_COPY(', | |
1546 'DISALLOW_COPY_AND_ASSIGN(', | |
1547 'DISALLOW_EVIL_CONSTRUCTORS(', | |
Nico
2015/12/04 21:42:56
fwiw i removed DISALLOW_EVIL_CTORS from macros.h e
Dan Beam
2015/12/04 22:53:02
look down, look back
THE PRESUBMIT IS NOW GONE
h
| |
1548 'DISALLOW_IMPLICIT_CONSTRUCTORS(', | |
1549 ) | |
1544 macros = '#include "base/macros.h"' | 1550 macros = '#include "base/macros.h"' |
1545 basictypes = '#include "base/basictypes.h"' | 1551 basictypes = '#include "base/basictypes.h"' |
1546 | 1552 |
1547 files = [] | 1553 files = [] |
1548 for f in input_api.AffectedSourceFiles(None): | 1554 for f in input_api.AffectedSourceFiles(None): |
1549 if not f.LocalPath().endswith('.h'): | 1555 if not f.LocalPath().endswith('.h'): |
1550 continue | 1556 continue |
1551 for line_num, line in f.ChangedContents(): | 1557 for line_num, line in f.ChangedContents(): |
1552 if line.lstrip().startswith('//'): # Strip C++ comment. | 1558 if line.lstrip().startswith('//'): # Strip C++ comment. |
1553 continue | 1559 continue |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1994 for master in masters: | 2000 for master in masters: |
1995 try_config.setdefault(master, {}) | 2001 try_config.setdefault(master, {}) |
1996 for builder in masters[master]: | 2002 for builder in masters[master]: |
1997 # Do not trigger presubmit builders, since they're likely to fail | 2003 # Do not trigger presubmit builders, since they're likely to fail |
1998 # (e.g. OWNERS checks before finished code review), and we're | 2004 # (e.g. OWNERS checks before finished code review), and we're |
1999 # running local presubmit anyway. | 2005 # running local presubmit anyway. |
2000 if 'presubmit' not in builder: | 2006 if 'presubmit' not in builder: |
2001 try_config[master][builder] = ['defaulttests'] | 2007 try_config[master][builder] = ['defaulttests'] |
2002 | 2008 |
2003 return try_config | 2009 return try_config |
OLD | NEW |