My first python project on github.com
findcnt - find a lot of regex in a lot of files
This little tool was written for a friend, who asked how he can have a csv from a set of regex applied onto a large tree of popular php-files. The regex should find some flaws in the files, csv should just show counts of them for letting him know, where to start his work to find vulnarabilities.
findcnt comes as a git repository and is accompanied with some doctests within the readme. Some reference data will help to have reliable Unittests. It is hosted at https://github.com/sl0/findcnt for your convienience.
The initial commit was on Tue, Jan 10 11:34:47 2012 +0100, some ten hours of writing my ideas into the python file spread over some weeks resulted in a usable tool.
And of course my program had at least one bug. Short after his first usage my friend told me, it does not count exactly. Especially if there are two regex in a single line, it counts only one. That wasn't the expected value. By using the doctests it was fixed in few minutes. And he was happy, me too.
Last commit was on Wed, Feb 22 23:38:56 2012 +0100
So I learned doctests to be useful. Software not accompanied by functional tests seems to be broken by design.
And I got to know github.com. It's great, if you're using git.