Add presubmit check to warn against using NULL
BUG=704361
[email protected]
Review-Url: https://codereview.chromium.org/2765423003
Cr-Commit-Position: refs/heads/master@{#460485}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 29e4ae4..344175b 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -157,6 +157,14 @@
# 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',