[libgames-support] style-checker: Allow applying patches with style errors



commit 82d6b2dd5c8242d560f2af7ff1f26cfd33563279
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Jul 30 19:57:46 2016 -0500

    style-checker: Allow applying patches with style errors
    
    Can't fix the style errors if we can't apply the patch.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762056

 style-checker |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/style-checker b/style-checker
index ac60b0c..d5ec4de 100755
--- a/style-checker
+++ b/style-checker
@@ -171,9 +171,17 @@ def main():
         else:
             print("Guideline checker found " + str(nIssues) + " issues.")
 
-        print("We strongly recommend you to fix these.")
-        print("To ignore use `git commit --no-verify`")
-        return -1
+        if os.path.basename(__file__) == 'pre-commit':
+            print("To ignore use `git commit --no-verify`")
+            return -1
+        elif os.path.basename(__file__) == 'pre-push':
+            print("To ignore use `git push --no-verify`")
+            return -1
+        elif os.path.basename(__file__) == 'pre-receive':
+            print("Your push has been rejected.")
+            return -1
+        elif os.path.basename(__file__) == 'pre-applypatch':
+            print("We strongly recommend you to fix these. Continuing anyway....")
     else:
         print("Guideline checker found no issues.")
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]