protected override ReportedViolation HandleDependencyViolation( DependencyViolationType violationType, AccessLevel accessLevel, AbsolutePath path, Process violator, bool isWhitelistedViolation, Pip related, AbsolutePath processPath) { ReportedViolation reportedViolation = new ReportedViolation(true, violationType, path, violator.PipId, related?.PipId, processPath); if (m_doLogging) { reportedViolation = base.HandleDependencyViolation(violationType, accessLevel, path, violator, isWhitelistedViolation, related, processPath); } // Always collect error violations, and also collect other non-errors if asked to. if (reportedViolation.IsError || m_collectNonErrorViolations) { bool added = CollectedViolations.Add( new DependencyViolation( violationType, accessLevel, path, violator, related )); XAssert.IsTrue(added, "Duplicate violation reported"); } return(reportedViolation); }
/// <nodoc/> public ReportedViolation(bool isError, DependencyViolationType type, AbsolutePath path, PipId violatorPipId, PipId?relatedPipId, AbsolutePath processPath, bool violationMakesPipUncacheable = true) { IsError = isError; Type = type; Path = path; ViolatorPipId = violatorPipId; RelatedPipId = relatedPipId; ProcessPath = processPath; ViolationMakesPipUncacheable = violationMakesPipUncacheable; }
protected override ReportedViolation HandleDependencyViolation( DependencyViolationType violationType, AccessLevel accessLevel, AbsolutePath path, Process violator, bool isWhitelistedViolation, Pip related, AbsolutePath processPath) { m_whitelistAnalyzer.HandleDependencyViolation(violationType, accessLevel, path, violator, related); // Dummy return value return(new ReportedViolation(false, violationType, path, violator.PipId, related?.PipId, processPath)); }