diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2008-09-08 17:07:36 +0200 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2008-09-08 17:07:36 +0200 |
commit | 349a72f0971eb022ab896e7fbf3d03a55315f7e3 (patch) | |
tree | 0dd42bad98c553724eab83fce3ed577d3c3d118d /bin | |
parent | dc2c80d0e79e96d54f8e4d248b21518f4beddfab (diff) | |
parent | 559c2c0df87acf21103b9d489b648dc6e8359a3d (diff) | |
download | pylint-git-349a72f0971eb022ab896e7fbf3d03a55315f7e3.tar.gz |
merge pyreverse into pylint
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/epylint | 29 | ||||
-rwxr-xr-x | bin/pylint | 4 | ||||
-rwxr-xr-x | bin/pylint-gui | 7 | ||||
-rw-r--r-- | bin/pylint-gui.bat | 20 | ||||
-rw-r--r-- | bin/pylint.bat | 19 | ||||
-rwxr-xr-x | bin/symilar | 3 | ||||
-rw-r--r-- | bin/symilar.bat | 20 |
7 files changed, 102 insertions, 0 deletions
diff --git a/bin/epylint b/bin/epylint new file mode 100755 index 000000000..b437e8acb --- /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() diff --git a/bin/pylint b/bin/pylint new file mode 100755 index 000000000..e20e03135 --- /dev/null +++ b/bin/pylint @@ -0,0 +1,4 @@ +#!/usr/bin/env python +import sys +from pylint import lint +lint.Run(sys.argv[1:]) diff --git a/bin/pylint-gui b/bin/pylint-gui new file mode 100755 index 000000000..025378fef --- /dev/null +++ b/bin/pylint-gui @@ -0,0 +1,7 @@ +#!/usr/bin/env python +import sys +try: + from pylint import gui + gui.Run(sys.argv[1:]) +except ImportError: + sys.exit('tkinter is not available') diff --git a/bin/pylint-gui.bat b/bin/pylint-gui.bat new file mode 100644 index 000000000..68d552ea5 --- /dev/null +++ b/bin/pylint-gui.bat @@ -0,0 +1,20 @@ +@echo off
+rem = """-*-Python-*- script
+@echo off
+rem -------------------- DOS section --------------------
+rem You could set PYTHONPATH or TK environment variables here
+python -x %~f0 %*
+goto exit
+
+"""
+# -------------------- Python section --------------------
+import sys
+from pylint import gui
+gui.Run(sys.argv[1:])
+
+
+DosExitLabel = """
+:exit
+rem """
+
+
diff --git a/bin/pylint.bat b/bin/pylint.bat new file mode 100644 index 000000000..772735ac7 --- /dev/null +++ b/bin/pylint.bat @@ -0,0 +1,19 @@ +@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 --------------------
+import sys
+from pylint import lint
+lint.Run(sys.argv[1:])
+
+
+DosExitLabel = """
+:exit
+rem """
+
+
diff --git a/bin/symilar b/bin/symilar new file mode 100755 index 000000000..7ca139fe2 --- /dev/null +++ b/bin/symilar @@ -0,0 +1,3 @@ +#!/usr/bin/env python +from pylint.checkers import similar +similar.run() diff --git a/bin/symilar.bat b/bin/symilar.bat new file mode 100644 index 000000000..5c9bd0ead --- /dev/null +++ b/bin/symilar.bat @@ -0,0 +1,20 @@ +@echo off
+rem = """-*-Python-*- script
+@echo off
+rem -------------------- DOS section --------------------
+rem You could set PYTHONPATH or TK environment variables here
+python -x %~f0 %*
+goto exit
+
+"""
+# -------------------- Python section --------------------
+import sys
+from pylint.checkers import similar
+similar.run()
+
+
+DosExitLabel = """
+:exit
+rem """
+
+
|