diff options
author | Gabor Kelemen <kelemeng@ubuntu.com> | 2018-11-08 23:37:33 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2018-11-13 09:03:45 +0100 |
commit | ae245cdde94432e01f2a4cd7b695c766ae6f569d (patch) | |
tree | cb88920706ae4514f5ad90062d16da7dc631251c /bin | |
parent | 3583f7a1256c901199574c8373443038e28813f0 (diff) |
find-unneeded-includes: sort the output
Default IWYU output is sorted alphabetically by filename
A more friendly way to present f-u-i information would be
to sort by line numbers: so that a developer can go through the removal
proposals in the editor top to bottom, without too much cursor positioning
in the list of 100 header lines to delete 20 of them.
The result is not perfect, because numbers in text are not naturally sorted:
line 205 will be listed between 20 and 21; but that's a really rare occasion
Change-Id: I8011321a299a76f5a32469a9d77eb8fcc4521034
Reviewed-on: https://gerrit.libreoffice.org/63144
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/find-unneeded-includes | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes index c949c887d905..ecc29fe32919 100755 --- a/bin/find-unneeded-includes +++ b/bin/find-unneeded-includes @@ -176,7 +176,7 @@ def processIWYUOutput(iwyuOutput, moduleRules): if not ignoreRemoval(fwdDecl, toAdd, currentFileName, moduleRules): toRemove.append("%s:%s: %s" % (currentFileName, lineno, fwdDecl)) - for remove in toRemove: + for remove in sorted(toRemove): print("ERROR: %s: remove not needed include / forward declaration" % remove) return len(toRemove) |