Online and CHM
DisableAllQualityChecks Method
Example 



KellermanSoftware.StaticCodeAnalysis Namespace > QualityLogic Class : DisableAllQualityChecks Method
Disable all quality checking.
Syntax
'Declaration
 
Public Sub DisableAllQualityChecks() 
'Usage
 
Dim instance As QualityLogic
 
instance.DisableAllQualityChecks()
public void DisableAllQualityChecks()
public:
void DisableAllQualityChecks(); 
Example
//Trial Mode
QualityLogic quality = new QualityLogic();
 
//Licensed Mode
//QualityLogic quality = new QualityLogic("User Name from Receipt", "License Key from Receipt");
 
//Disable all quality checks
quality.DisableAllQualityChecks();
 
//Re-enable just the cyclomatic complexity
//https://en.wikipedia.org/wiki/Cyclomatic_complexity
const int cyclomaticComplexityHard = 21;
quality.Config.SetConfig("MaxCyclomaticComplexity", cyclomaticComplexityHard);
 
//Test using this open source project:  https://github.com/GregFinzer/Compare-Net-Objects
QualityResult qualityResult =
quality.GetQualityViolationsForDirectory(@"c:\_git\Compare-Net-Objects\Compare-Net-Objects");
 
//Export the results to an HTML Report
string htmlReportFilePath = Path.Combine(Environment.CurrentDirectory, "QualityResult.html");
quality.ExportViolationsToHtmlReportFile(qualityResult, TemplateName.BlackAndBlue, htmlReportFilePath);
'Trial Mode
Dim quality As New QualityLogic()
 
'Licensed Mode
'QualityLogic quality = new QualityLogic("User Name from Receipt", "License Key from Receipt");
 
'Disable all quality checks
quality.DisableAllQualityChecks()
 
'Re-enable just the cyclomatic complexity
'https://en.wikipedia.org/wiki/Cyclomatic_complexity
Const cyclomaticComplexityHard As Integer = 21
quality.Config.SetConfig("MaxCyclomaticComplexity", cyclomaticComplexityHard)
 
'Test using this open source project:  https://github.com/GregFinzer/Compare-Net-Objects
Dim qualityResult As QualityResult = quality.GetQualityViolationsForDirectory("c:\_git\Compare-Net-Objects\Compare-Net-Objects")
 
'Export the results to an HTML Report
Dim htmlReportFilePath As String = Path.Combine(Environment.CurrentDirectory, "QualityResult.html")
quality.ExportViolationsToHtmlReportFile(qualityResult, TemplateName.BlackAndBlue, htmlReportFilePath)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

QualityLogic Class
QualityLogic Members