Skip to content

Produce warning when tech debt is fixed#18

Merged
olstakh merged 6 commits intomainfrom
users/olstakh/tech-debt
Feb 26, 2026
Merged

Produce warning when tech debt is fixed#18
olstakh merged 6 commits intomainfrom
users/olstakh/tech-debt

Conversation

@olstakh
Copy link
Owner

@olstakh olstakh commented Feb 26, 2026

IsTechDebt was added to the exception object. If a reference was forbidden and there was an exception to that rule marked with IsTechDebt: true - warning will be produced when that exception no longer exists, so it can be removed.

This pull request introduces a new analyzer rule (RP0006) to help teams clean up technical debt by identifying "tech debt" exceptions in dependency rules that are no longer needed. It adds support for marking exceptions as technical debt, updates the schema and documentation, implements the analyzer logic, and provides comprehensive tests for the new behavior.

Key changes:

Analyzer enhancements:

  • Added a new diagnostic rule, RP0006, which warns when a tech debt exception in DependencyRules.json no longer matches any declared reference and can be removed. [1] [2] [3]
  • Implemented logic in ReferenceProtector.Analyzers to detect and report stale tech debt exceptions for both project and package dependencies. [1] [2] [3]

Dependency rule model/schema updates:

  • Extended the Exceptions record and JSON schema to support an IsTechDebt boolean property, defaulting to false. [1] [2]

Documentation and samples:

  • Updated README.md to document the new RP0006 warning and how to use the IsTechDebt flag in exceptions. [1] [2]
  • Added examples in samples/DependencyRules.json demonstrating tech debt exceptions and expected warnings.

Testing:

  • Added comprehensive analyzer tests to verify detection of stale tech debt exceptions, correct handling of non-tech-debt exceptions, and default behavior.

Other:

  • Made minor property changes in build props files to clarify or override DisableTransitiveProjectReferences as needed for samples. [1] [2]

@olstakh olstakh merged commit 0e00ae5 into main Feb 26, 2026
2 checks passed
@olstakh olstakh deleted the users/olstakh/tech-debt branch February 26, 2026 00:51
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