| Index: PRESUBMIT.py
|
| diff --git a/PRESUBMIT.py b/PRESUBMIT.py
|
| index 7d32ad5388b293628e1a9229cf09f8700c3494f3..29cf11b3c8e8e2a52e48d7090375bf33388de93f 100644
|
| --- a/PRESUBMIT.py
|
| +++ b/PRESUBMIT.py
|
| @@ -2036,6 +2036,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))
|
| @@ -2045,6 +2059,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
|
|
|
|
|
|
|