| Index: PRESUBMIT.py
|
| diff --git a/PRESUBMIT.py b/PRESUBMIT.py
|
| index e2e042336926e54a01f47dd33769c9a534c7c92c..d6fce1a5f0f1bd875381b0bac199f5f97a91f81c 100644
|
| --- a/PRESUBMIT.py
|
| +++ b/PRESUBMIT.py
|
| @@ -2200,6 +2200,20 @@ def _CheckForWindowsLineEndings(input_api, output_api):
|
| return []
|
|
|
|
|
| +def _CheckSyslogUseWarning(input_api, output_api, source_file_filter=None,
|
| + lint_filters=None, verbose_level=None):
|
| + """Checks that all source files use SYSLOG properly."""
|
| + syslog_files = []
|
| + for f in input_api.AffectedSourceFiles(source_file_filter):
|
| + if 'SYSLOG' in input_api.ReadFile(f, 'rb'):
|
| + syslog_files.append(f.LocalPath())
|
| + if syslog_files:
|
| + return [output_api.PresubmitPromptWarning(
|
| + 'Please make sure there are no privacy sensitive bits of data in SYSLOG'
|
| + ' calls.\nFiles to check:\n', items=syslog_files)]
|
| + return []
|
| +
|
| +
|
| def CheckChangeOnUpload(input_api, output_api):
|
| results = []
|
| results.extend(_CommonChecks(input_api, output_api))
|
| @@ -2208,6 +2222,7 @@ def CheckChangeOnUpload(input_api, output_api):
|
| input_api.canned_checks.CheckGNFormatted(input_api, output_api))
|
| results.extend(_CheckUmaHistogramChanges(input_api, output_api))
|
| results.extend(_AndroidSpecificOnUploadChecks(input_api, output_api))
|
| + results.extend(_CheckSyslogUseWarning(input_api, output_api))
|
| return results
|
|
|
|
|
|
|