util: Make sorted includes verifier less confusing

verifiers.py complains about unordered includes where there is
more than one empty line under the #include region, even if
the includes are sorted.

This change adds a note about the fact.

Change-Id: I7a8dbc12fd82db0f0cadcfec270e42f6e0de4aea
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46580
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Hoa Nguyen
2021-06-07 12:21:05 -07:00
parent 59879e3794
commit cfa028291e

View File

@@ -361,8 +361,10 @@ class SortedIncludes(Verifier):
if modified:
if not silent:
self.ui.write("invalid sorting of includes in %s\n"
% (filename))
self.ui.write("invalid sorting of includes in %s. Note: If "
"there is more than one empty line under the "
"#include region, please reduce it to one.\n"
% (filename))
if self.ui.verbose:
for start, end in modified.regions:
self.ui.write("bad region [%d, %d)\n" % (start, end))