private static ViolationList WithOneViolation() { var violationList = new ViolationList(); violationList.AddViolationToFile(ViolationSource.ViolationFileName, ViolationSource.FirstViolation); return violationList; }
public void RenderViolationList(ViolationList violationList) { this.outputWriter.WriteLine("StyleCop.Baboon by Nelson Senna."); var totalViolations = 0; foreach (var violation in violationList.Violations) { var fileName = violation.Key; var numberOfViolations = violationList.GetTotalViolationsForFile(fileName); totalViolations += numberOfViolations; this.outputWriter.WriteLineWithSeparator(string.Format("File: {0}", fileName), string.Empty); this.RenderViolationsPerFile(violation.Value); this.outputWriter.WriteLine(string.Format("Violations found: {0}", numberOfViolations)); } this.RenderSummary(totalViolations, violationList.TotalFilesAnalyzed); }
public void Init() { this.list = new ViolationList(); }