bin/find-unneeded-includes |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ae245cdde94432e01f2a4cd7b695c766ae6f569d
Author:     Gabor Kelemen <[email protected]>
AuthorDate: Thu Nov 8 23:37:33 2018 +0100
Commit:     Miklos Vajna <[email protected]>
CommitDate: Tue Nov 13 09:03:45 2018 +0100

    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 <[email protected]>

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)
 
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to