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

Unified Diff: PRESUBMIT.py

Issue 2765423003: Add presubmit check to warn against using NULL (Closed)
Patch Set: Created 3 years, 9 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.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 16f00ad5bff741fd78119cda7f62031447597c1d..3ba67dd1169d02c9425ae09384a272ea2512b4bc 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -155,6 +155,14 @@ _BANNED_CPP_FUNCTIONS = (
# FRIEND_TEST_ALL_PREFIXES() macro from base/gtest_prod_util.h should be
# used instead since that allows for FLAKY_ and DISABLED_ prefixes.
(
+ r'\bNULL\b',
+ (
+ 'New code should not use NULL. Use nullptr instead.',
+ ),
+ True,
+ (),
+ ),
+ (
'FRIEND_TEST(',
(
'Chromium code should not use gtest\'s FRIEND_TEST() macro. Include',
« 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