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 | 9156db779ab939a8b7c50f68a511887fd20057cc (patch) | |
tree | 4438021c61061fdf452a9ba63b74b7681fcc25f5 /bin | |
parent | 78ad977bb7fdb6b77232e16a6f25b36ee35755e7 (diff) | |
parent | d6b4e6fb77a6743d3a27235837210e9d54757701 (diff) | |
download | pylint-9156db779ab939a8b7c50f68a511887fd20057cc.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 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() diff --git a/bin/pylint b/bin/pylint new file mode 100755 index 0000000..e20e031 --- /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 0000000..025378f --- /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 0000000..68d552e --- /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 0000000..772735a --- /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 0000000..7ca139f --- /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 0000000..5c9bd0e --- /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 """
+
+
|