Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making Development Better with Static Analysis

I find, when I'm reviewing VBA code, that most of the bugs are easily classified errors, such as typos, not setting things to Nothing, not closing DB connections, etc.

I know that using "Option Explicit" can solve some of these, but I'd rather use something more powerful.

Are there any static analysis tools for VBA?

like image 759
Allain Lalonde Avatar asked Jan 06 '09 16:01

Allain Lalonde


People also ask

What are the benefits of static analysis?

Static code analysis advantages:It can find weaknesses in the code at the exact location. It can be conducted by trained software assurance developers who fully understand the code. It allows a quicker turn around for fixes. It is relatively fast if automated tools are used.

Is static analysis done by developers?

Static analysis is used in software engineering by software development and quality assurance teams. Automated tools can assist programmers and developers in carrying out static analysis. The software will scan all code in a project to check for vulnerabilities while validating the code.

Why do software developers use static analysis tools?

Static analysis tools provide a means for analyzing code without having to run the code, helping ensure higher quality software throughout the development process.

When Should static analysis be used?

Static code analysis is performed early in development, before software testing begins. For organizations practicing DevOps, static code analysis takes place during the “Create” phase. Static code analysis also supports DevOps by creating an automated feedback loop.


2 Answers

You can perhaps start by using MZ-Tools. While it does not have much in the realm of static analysis features, it is free and does provide some help in managing and editing your code base.

One feature it has that does perform a form of static analysis is:

  • Review Source Code- An extremely limited version of code analysis. It tells you if a variable, constant, or procedure is not being used. Good to help clean up your code and get rid of cruft.
like image 136
Ray Avatar answered Sep 28 '22 06:09

Ray


Project Analyzer: VBA Plug v3
MZ Tools
VBA Code Profiler *

  • no idea whether this is supported still, or what the quality of the product is like.
like image 22
Anonymous Type Avatar answered Sep 28 '22 06:09

Anonymous Type