Chromium Code Reviews| Index: PRESUBMIT.py | 
| diff --git a/PRESUBMIT.py b/PRESUBMIT.py | 
| index 0076836a086d7d5f7530b3f8caff282c84ad9f98..7d87d8850f6975eb4d1f36c0c152a686c773c9ee 100644 | 
| --- a/PRESUBMIT.py | 
| +++ b/PRESUBMIT.py | 
| @@ -2215,6 +2215,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'): | 
| 
 
Evan Stade
2017/01/12 01:56:42
is there a particular reason to read the whole fil
 
pastarmovj
2017/01/12 10:35:21
Problem solved :) https://codereview.chromium.org/
 
 | 
| + 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)) | 
| @@ -2223,6 +2237,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 |