summaryrefslogtreecommitdiffstats
path: root/testing/pychecker
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2012-05-23 21:30:05 +0000
committerFabian Affolter <fabian@affolter-engineering.ch>2012-05-25 19:36:34 +0000
commit8f4729de5750a1dabf52d7bd6d7ff2fbb68f597e (patch)
treec47267d0f1a24b071e96330a7c4ef1f9d55b7746 /testing/pychecker
parent69d820f3b4f572b96243a77c1158ee3cbbd2009c (diff)
downloadaports-8f4729de5750a1dabf52d7bd6d7ff2fbb68f597e.tar.bz2
aports-8f4729de5750a1dabf52d7bd6d7ff2fbb68f597e.tar.xz
testing/pychecker: new aport
PyChecker is a tool for finding bugs in python source code. It finds problems that are typically caught by a compiler for less dynamic languages, like C and C++. It is similar to lint. Because of the dynamic nature of python, some warnings may be incorrect; however, spurious warnings should be fairly infrequent. PyChecker works in a combination of ways. First, it imports each module. If there is an import error, the module cannot be processed. The import provides some basic information about the module. The code for each function, class, and method is checked for possible problems. Types of problems that can be found include: * No global found (e.g., using a module without importing it) * Passing the wrong number of parameters to functions/methods/constructors * Passing the wrong number of parameters to builtin functions & methods * Using format strings that don't match arguments * Using class methods and attributes that don't exist * Changing signature when overriding a method * Redefining a function/class/method in the same scope * Using a variable before setting it * self not the first parameter to a method * Unused globals and locals (module or variable) * Unused function/method arguments (can ignore self) * No doc strings in modules, classes, functions, and methods http://pychecker.sourceforge.net/
Diffstat (limited to 'testing/pychecker')
-rw-r--r--testing/pychecker/APKBUILD38
1 files changed, 38 insertions, 0 deletions
diff --git a/testing/pychecker/APKBUILD b/testing/pychecker/APKBUILD
new file mode 100644
index 000000000..95cb1620a
--- /dev/null
+++ b/testing/pychecker/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=pychecker
+pkgver=0.8.19
+pkgrel=0
+pkgdesc="A analyser for python source code"
+url="http://pychecker.sourceforge.net/"
+arch="noarch"
+license="BSD"
+depends="python"
+depends_dev=""
+makedepends="python-dev"
+install=""
+subpackages=""
+source="http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+md5sums="c37182863dfb09209d6ba4f38fce9d2b pychecker-0.8.19.tar.gz"