Skip to content

Commit

Permalink
Fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
gfraiteur committed Sep 12, 2024
1 parent 4b18326 commit cb4bca9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CodeQualityTalk.Verifier/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@
workspace.SourceCode.Types
.Where(t => t.ContainingNamespace.FullName == "CodeQualityTalk.Abstractions")
.SelectMany(t => t.GetOutboundReferences())
.Where(r => r.DestinationDeclaration.GetNamespace()?.FullName == "CodeQualityTalk.Documents")
.Where(r =>
{
var ns = r.DestinationDeclaration.GetNamespace()!.FullName;
return ns.StartsWith("CodeQualityTalk") && ns != "CodeQualityTalk.Abstractions";
})
.Report(Severity.Warning, "MY003",
"The CodeQualityTalks.Abstractions namespace cannot use the CodeQualityTalk.Documents namespace.");
"The CodeQualityTalks.Abstractions namespace must only not have dependencies to other namespaces.");

Console.WriteLine(
$"{DiagnosticReporter.ReportedWarnings + DiagnosticReporter.ReportedErrors} architecture violations found.");
Expand Down

0 comments on commit cb4bca9

Please sign in to comment.