[Libreoffice-commits] core.git: bin/find-unneeded-includes

Gabor Kelemen (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 29 07:10:44 UTC 2019


 bin/find-unneeded-includes |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit fc6b31910f419ea7ea541aa9c4e44ba33d2cc549
Author:     Gabor Kelemen <kelemen.gabor2 at nisz.hu>
AuthorDate: Fri Jul 26 22:18:10 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Jul 29 09:10:00 2019 +0200

    find-unneeded-includes: warn first time user nicely about missing file
    
    Change-Id: Ibc0b818a410cf0aee19b1d2a42a53db9aff87638
    Reviewed-on: https://gerrit.libreoffice.org/76461
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes
index 66a5df6f044b..c89b69fc9d2a 100755
--- a/bin/find-unneeded-includes
+++ b/bin/find-unneeded-includes
@@ -296,8 +296,12 @@ def main(argv):
         print("usage: find-unneeded-includes [FILE]...")
         return
 
-    with open("compile_commands.json", 'r') as compileCommandsSock:
-        compileCommands = json.load(compileCommandsSock)
+    try:
+        with open("compile_commands.json", 'r') as compileCommandsSock:
+            compileCommands = json.load(compileCommandsSock)
+    except FileNotFoundError:
+        print ("File 'compile_commands.json' does not exist, please run:\nmake vim-ide-integration")
+        sys.exit(-1)
 
     tidy(compileCommands, paths=argv)
 


More information about the Libreoffice-commits mailing list