python代码静态分析工具:PyChecker

jopen 12年前

pychecker编写的Python静态编译器,用于在编译器查找py脚本的错误,它支持python2.0 – 2.7。PyChecker可以发现的问题包括:

  • 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 is not the first parameter defined for 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://www.open-open.com/lib/view/home/1350706085039