feat: Enforce newlines at the end of all text files in PatchCheck.py.

PatchCheck.py currently checks for files without terminating newlines
but takes no action. This change will report this as a code format error.

Signed-off-by: Bejean Mosher <bejean.mosher@intel.com>
This commit is contained in:
Bejean Mosher 2022-12-09 13:38:58 -05:00 committed by Guo Dong
parent ecbcbbdadd
commit 3cf8c298f4
1 changed files with 1 additions and 1 deletions

View File

@ -408,7 +408,7 @@ class GitDiffCheck:
elif line.startswith('\r\n'):
pass
elif line.startswith(r'\ No newline '):
pass
self.error('No newline at end of file %s' % (self.filename))
elif not line.startswith(' '):
self.format_error("unexpected patch line")
self.line_num += 1