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

Unified Diff: presubmit_canned_checks.py

Issue 924863002: Remove the Singleton<T> presubmit check from presubmit_canned_checks.py (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_canned_checks.py
diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
index bd628fb3665c4cc289f22c02c91a5510348eb1c0..59e7be242fc5766bbc983406a75127d46cd867de 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -977,6 +977,11 @@ def CheckSingletonInHeaders(input_api, output_api, source_file_filter=None):
for f in input_api.AffectedSourceFiles(source_file_filter):
if (f.LocalPath().endswith('.h') or f.LocalPath().endswith('.hxx') or
f.LocalPath().endswith('.hpp') or f.LocalPath().endswith('.inl')):
+ # It's ok for base/memory/singleton.h to have |Singleton<|.
+ singleton_h_path = input_api.os_path.join(
+ 'base', 'memory', 'singleton.h')
M-A Ruel 2015/02/13 17:04:17 You can't hardcode src.git paths here.
+ if f.LocalPath().endswith(singleton_h_path):
+ break
contents = input_api.ReadFile(f)
for line in contents.splitlines(False):
if (not input_api.re.match(r'//', line) and # Strip C++ comment.
« 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