On our project we use Macroview to visualise and edit data. The script that drives the proces is subject to our definition of done code standards. A review of the script is a time consuming activity that is leading to frustration in our team. Time to get some tooling support.
First we looked at StyleCop and other static code analysis tools. Since the script language isn’t widely used no of-the-shelve solution was found. We did stumble upon a tool that seemed to use regular expressions. This was an idea worth exploring.
We have a full license to EditPad Pro. This rich text editor has the ability to search with regular expressions. When a match is found, the text is highlighted. In an hour or two we developed some expressions that can be divided in three groups:
- Highlight blocks, used to view comment blocks
- Highlight correct, correct used and spelled keywords are highlighted, this was abnormalities are found easy (not highlighted)
- Find defects, negative search used for explicit rules, highlighted items are wrong
Using the list of regular expressions sped up the code review and made it more reliable. The code quality has gone up and new code is quickly reviewed. One up for regular expressions.