Problem detection (code review)

Code review problem list

Project Analyzer does an automated code review to detect programming problems and to suggest improvements. This feature is useful for optimization, quality control and automated coding standards enforcement.

Code review rules
Comment directives
Problem options
Problem reports

Problem types

  1. Optimization. Unoptimal programming: slow performance, high memory consumption and dead code. Enhance the run-time speed and lower the memory requirements by fixing these problems.
  2. Style. Source code style issues and suggestions. These problems are visible to programmers, not the end users. Developing with bad style doesn't necessarily cause errors right away, but inconsistent style often leads to lower understandability and the introduction of new errors during maintenance or further development.
  3. Functionality. Issues affecting run-time behavior and the user interface. These are the problems that end users are most likely to complain about.
  4. VB.NET compatibility. These problems show incompatibilities between VB6 and VB.NET syntax. The Enterprise Edition is required to view compatibility issues.
  5. Internal. This is a rare problem type that appears if Project Analyzer has found something in the analysis that it cannot handle. Right-click the problem to view a suggested solution.

View the code review rules to read details about the problems. You can also right-click a problem to read what it is about.

Severity levels

Code review rules

How do I see the problems?

How do I fix the problems?

Get a Problem report, and fix your code. Auto-fix can automatically repair a part of the problems, remove dead code and add a comment about those problems that cannot be fixed automatically.

Why isn't this code shown as a problem?

Sometimes you may notice that Project Analyzer doesn't indicate a problem even if the code looks problematic. There are a few explanations to this.

  1. Project Analyzer detected a reason why you should accept problematic code. For example, you cannot safely remove a piece of seemingly dead code because it may be called implicitly. Or, there's no sense in writing an error handler for an empty procedure.
  2. The code was generated by Visual Studio and you shouldn't change it manually.
  3. A comment directive is in effect.

Read more

Code review rules
Comment directives
Problem options
Problem reports

©Aivosto Oy - Project Analyzer Help Contents