summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>2008-04-14 17:56:00 +0200
committerAlexandre Fayolle <alexandre.fayolle@logilab.fr>2008-04-14 17:56:00 +0200
commit3d0a7774fdbbd7cf760a733ee85f310b9ebdace5 (patch)
tree0d3d533ad244b6fcaa6ecffab20651afefb2ad36 /bin
parent74db8d1b2815a0dc8b440577820fb09a8c36d4ad (diff)
downloadpylint-3d0a7774fdbbd7cf760a733ee85f310b9ebdace5.tar.gz
added pylint/flymake related files
Diffstat (limited to 'bin')
-rw-r--r--bin/epylint29
1 files changed, 29 insertions, 0 deletions
diff --git a/bin/epylint b/bin/epylint
new file mode 100644
index 0000000..b437e8a
--- /dev/null
+++ b/bin/epylint
@@ -0,0 +1,29 @@
+#!/usr/bin/env python
+
+import re
+import sys
+
+from subprocess import *
+
+p = Popen("pylint -f parseable -r n --disable-msg-cat=C,R %s" %
+ sys.argv[1], shell = True, stdout = PIPE).stdout
+
+for line in p:
+ match = re.search("\\[([WE])(, (.+?))?\\]", line)
+ if match:
+ kind = match.group(1)
+ func = match.group(3)
+
+ if kind == "W":
+ msg = "Warning"
+ else:
+ msg = "Error"
+
+ if func:
+ line = re.sub("\\[([WE])(, (.+?))?\\]",
+ "%s (%s):" % (msg, func), line)
+ else:
+ line = re.sub("\\[([WE])?\\]", "%s:" % msg, line)
+ print line,
+
+p.close()