private static void AssertExpectedErrorLog(BuildLog result, string expectedErrorLog) { result.AssertPropertyValue(TargetProperties.SonarErrorLog, "OriginalValueFromFirstBuild.json"); // SetRazorCodeAnalysisProperties target doesn't change it result.AssertPropertyValue(TargetProperties.ErrorLog, expectedErrorLog); result.AssertPropertyValue(TargetProperties.RazorSonarErrorLog, expectedErrorLog); result.AssertPropertyValue(TargetProperties.RazorCompilationErrorLog, expectedErrorLog); }
/// <summary> /// Checks that VS2019 properties are set to run the analysis. /// </summary> private static void AssertRunAnalyzersIsEnabled(BuildLog actualResult) { actualResult.AssertPropertyValue(TargetProperties.RunAnalyzers, "true"); actualResult.AssertPropertyValue(TargetProperties.RunAnalyzersDuringBuild, "true"); }
private static void AssertExpectedResolvedRuleset(BuildLog result, string expectedResolvedRuleset) => result.AssertPropertyValue(TargetProperties.ResolvedCodeAnalysisRuleset, expectedResolvedRuleset);
/// <summary> /// Checks that no analysis warnings will be treated as errors nor will they be ignored /// </summary> private static void AssertWarningsAreNotTreatedAsErrorsNorIgnored(BuildLog actualResult) { actualResult.AssertPropertyValue(TargetProperties.TreatWarningsAsErrors, "false"); actualResult.AssertPropertyValue(TargetProperties.WarningsAsErrors, ""); actualResult.AssertPropertyValue(TargetProperties.WarningLevel, "4"); }
private static void AssertExpectedErrorLog(BuildLog result, string expectedErrorLog) => result.AssertPropertyValue(TargetProperties.ErrorLog, expectedErrorLog);