linters/check-cpp: Don't produce debug log
authorBen Gamari <ben@smart-cactus.org>
Mon, 7 Dec 2015 09:53:44 +0000 (10:53 +0100)
committerBen Gamari <ben@smart-cactus.org>
Mon, 7 Dec 2015 09:54:06 +0000 (10:54 +0100)
.arc-linters/check-cpp.py

index c58da09..1d07b4e 100755 (executable)
@@ -9,16 +9,19 @@ import os
 import json
 import re
 
-
-def setup_logging():
-    logger = logging.getLogger()
+def setup_logging(logger):
+    """
+    ``arc lint`` makes it quite tricky to catch debug output from linters.
+    Log to a file to work around this.
+    """
     hdlr = logging.FileHandler('linter.log', 'w')
     logger.addHandler(hdlr)
     logger.setLevel(logging.DEBUG)
     return logger
 
-logger = setup_logging()
-#logger.debug(sys.argv)
+logger = logging.getLogger()
+#setup_logging(logger)
+logger.debug(sys.argv)
 
 path = sys.argv[1]
 warnings = []