reidevries / codecoach

A program that finds "bad smells" in your Python code by parsing and analyzing it.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

codecoach

codecoach prototype

To work on a file, use the command: python codecoach.py [filename] where [filename] is the path to the file. If multiple arguments are provided, it will work on the last one.

The shell script "work.sh" is used to work on all the test scripts in the test folder. This allowed data to be collected automatically over a large number of scripts.

settings

There are a number of settings that can be adjusted for different outputs, debugging, etc.

In codecoach.py: -PRINT_OUTPUTS prints the detected smells. In normal use, only this would be true. -PRINT_STATS prints the number of unique and total smells detected in the script. -PRINT_WHICH_SMELL_STATS prints a 1 or 0 for each smell, depending if it was found. -PRINT_TREE prints the tree generated by pyparser.py. -PRINT_EXCEPTIONS toggles whether errors will be printed or not. In pyinterpret.py: -INTERPRETER_DEBUG prints debug messages In pyparser.py: -PARSER_PRINTTOKENS prints the more important tokens when the parser synthesizes them. -PARSER_DEBUG prints some error messages and helpful debugging messages. -LEXER_PRINTTOKENS prints the more important tokens when the lexer synthesizes them. -LEXER_DEBUG prints errors found by the lexer.

About

A program that finds "bad smells" in your Python code by parsing and analyzing it.


Languages

Language:Python 99.1%Language:Shell 0.9%