Skip to content

Scope RT0006 error to current compilation only#19

Merged
olstakh merged 3 commits intomainfrom
users/olstakh/next-version
Feb 26, 2026
Merged

Scope RT0006 error to current compilation only#19
olstakh merged 3 commits intomainfrom
users/olstakh/next-version

Conversation

@olstakh
Copy link
Owner

@olstakh olstakh commented Feb 26, 2026

This pull request improves the handling of tech debt exceptions in dependency rule analysis, ensuring that exceptions scoped to other projects do not trigger stale exception warnings (RP0006) in the current project's compilation. It also adds new tests to verify this behavior and introduces a build step to clean up stale package artifacts before running integration tests.

Dependency rule evaluation improvements:

  • Updated ReportStaleTechDebtProjectExceptions and ReportStaleTechDebtPackageExceptions methods to only evaluate exceptions whose From property matches the current project, preventing false positives for RP0006 when exceptions are scoped to other projects. [1] [2] [3] [4]
  • Modified calls to these methods in AnalyzeDependencyRules to pass the current project path as an argument. [1] [2]

Test coverage enhancements:

  • Added unit and integration tests (TechDebtException_ForDifferentProject_ShouldNotReportDiagnostic_Async and TechDebtException_ForDifferentProject_NoWarning_Async) to verify that tech debt exceptions for other projects do not trigger RP0006 in the current project. [1] [2]

Build reliability improvements:

  • Added a CleanStalePackages target to the integration test project file to remove old .nupkg files from the artifacts directory before resolving project references, preventing tests from running against outdated analyzer code.

@olstakh olstakh merged commit 6a94122 into main Feb 26, 2026
2 checks passed
@olstakh olstakh deleted the users/olstakh/next-version branch February 26, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant