PRESUBMIT: Align expected and actual guard names for easier mistake spotting.
Right now they are not aligned and since guard names are typically long,
aligning them *might* be helpful to some.
Example:
Header using the wrong include guard name FOOBARX_H_
foobar.h:1
***************
Expected: u'FOOBAR_H_'
Found: u'FOOBARX_H_'
***************
With the CL:
***************
Expected: u'FOOBAR_H_'
Found: u'FOOBARX_H_'
***************
Bug: None
Change-Id: I4c51b602a8da3bcb2db405def2d6193519cdea87
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1836001
Reviewed-by: Daniel Cheng <[email protected]>
Commit-Queue: Daniel Cheng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#702651}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 5fb6c76..3d842f06 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -4374,7 +4374,7 @@
errors.append(output_api.PresubmitPromptWarning(
'Header using the wrong include guard name %s' % guard_name,
['%s:%d' % (f.LocalPath(), line_number + 1)],
- 'Expected: %r\nFound: %r' % (expected_guard, guard_name)))
+ 'Expected: %r\nFound: %r' % (expected_guard, guard_name)))
else:
# The line after #ifndef should have a #define of the same name.
if line_number == guard_line_number + 1: