devAdvantage  devAdvantage

Violations

Violations are issues found by analyzing code and displayed in the Analysis Results window.  They indicate possible issues that exist in code and in many cases can be automatically corrected. 

Violation Categories - Violations are categorized to clarify their severity as well as the confidence in the issue.  Because some issues found during analysis are somewhat subjective in nature, these categories or types help you understand the propbability and seriousness of the violation.  The category for each violation is shown in the first column of the Analysis Results table as symbols and will display the name of the category when you mouse over the symbol. The categories for violations are:

  Error- Critical violations that are serious issues in code that are definitive bugs or issues that should be corrected.
 Warning - A warning is a violation that appears to be an issue but is most likely not a bug
 Suggestion - Suggestions are not related to bugs and are typically used to indicate issues around standards and opportunities to optimize the code.

Violation Description - Each violation found is summarized in a description.  The description briefly tells you what the issue is and a little about the specific problem - such as variable names, types, etc.  To learn more about the specific violation you can see the documentation by selecting a violation, right-clicking the mouse and choosing the Explain Violation from the context menu.

Violation Correctability - Some violations can be automatically corrected, others cannot while others require some user interaction to complete the correction.  These are indicated by the third column in the Analysis Results table by the following symbols

Violation Location - A violation also contains the location (file name and line number) of where it occurs in code - and is displayed in the last column of the analysis results control.  By double-clicking on the violation you will be taken to the file and location of the violation.  You can also do the same by selecting the violation and right-clicking to get a context menu.  The menu has an item - Go To violation.  The Analysis Results table only shows the file name - by mousing over the cell a tool tip will show the fill file path.