Extending Rule Set for Static Code Analysis in .NET Platform
This paper focuses on static code analysis tools for .NET platform. Static code analysis tools typically use a certain set of rules. In this paper we have proposed to implement four rules, which we consider important from our practical experience of software development. We have analysed existing popular static analysis tools for .NET platform in order to determine whether they have the rules equivalent to our proposed new rules. We have selected an open-source tool Gendarme for the implementation of these rules. We also investigated existing Gendarme rules and discovered that some of them could be improved. Therefore, we have proposed and implemented improvements for four existing Gendarme rules. In order to evaluate the improvements made in Gendarme rule set in a real-life environment, the source code of five open-source programs from sourceforge.net was tested using new and improved rules. Experiment results indicate that the improvements of existing Gendarme rules and the creation of new rules enable detection of more errors and can increase the quality of source code.