summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorSylvain Thenault <sylvain.thenault@logilab.fr>2008-12-03 09:57:14 +0100
committerSylvain Thenault <sylvain.thenault@logilab.fr>2008-12-03 09:57:14 +0100
commitdbb3782eed13cc1c8361f1265a64e113bd4a088b (patch)
tree786266acfdebd258ea11a276ea06f5b990d3a16c /bin
parent0af90f1aaa908f54d65382e6acfb0ec2ec5aae23 (diff)
downloadpylint-dbb3782eed13cc1c8361f1265a64e113bd4a088b.tar.gz
add epylint.bat script to fix Windows installation
Diffstat (limited to 'bin')
-rwxr-xr-xbin/epylint29
-rw-r--r--bin/epylint.bat16
2 files changed, 18 insertions, 27 deletions
diff --git a/bin/epylint b/bin/epylint
index a133c43..4aad657 100755
--- a/bin/epylint
+++ b/bin/epylint
@@ -1,28 +1,3 @@
#!/usr/bin/env python
-
-import re
-import sys
-
-from popen2 import popen3
-
-p, _in, _err = popen3("pylint -f parseable -r n --disable-msg-cat=C,R,I %s" % sys.argv[1])
-
-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()
+from pylint import epylint
+epylint.Run()
diff --git a/bin/epylint.bat b/bin/epylint.bat
new file mode 100644
index 0000000..a506782
--- /dev/null
+++ b/bin/epylint.bat
@@ -0,0 +1,16 @@
+@echo off
+rem = """-*-Python-*- script
+rem -------------------- DOS section --------------------
+rem You could set PYTHONPATH or TK environment variables here
+python -x "%~f0" %*
+goto exit
+
+"""
+# -------------------- Python section --------------------
+from pylint import epylint
+epylint.Run()
+
+
+DosExitLabel = """
+:exit
+rem """