Now, in Team System, you can set up all kinds of rules for checking code in to help manage this process but what can you do in FoxPro?
One idea that came to me was extending the VFPX Code Analyst tool to become “project” or “environment” specific. Yes, you can create a number of new rules to run within the code analyst and enable/disable them as needed but what would also be useful would be to allow different projects to have “different” sets of rules that they might apply to. Then set up a project hook so that when you BUILD the project, the rules automatically run, telling you what’s good and what’s bad.
In this sense, you now have an automated “code review” tool.
The default rules in Code Analyst handle a number of generic pieces like identifying areas for refactoring, or finding known gotchas like RETURNs within ENDWITH, similar lines of code, but consider project-specific types of rules: ensuring classes are based on a common class library, appropriate use of MESSAGEBOX, no compilation errors, etc – and the tool takes on a whole new benefit.
This is one of those things that I’m going to add to the “to do” list for the Code Analyst: built-in project hooks, and some useful project rules.
What type of rules would you want to see in your code?
Powered by ScribeFire.