Enhance code complexity reporting and quality checks#2641
Draft
robgruen wants to merge 33 commits into
Draft
Conversation
… And added to build-ts to gate builds.
…ibute sanitization' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…rosoft/TypeAgent into dev/robgruen/code_complexity
…ist to each report/gate/check. pnpm lint now runs these checks in addition to prettier
…rosoft/TypeAgent into dev/robgruen/code_complexity
…rosoft/TypeAgent into dev/robgruen/code_complexity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request migrates the code-quality gates for TypeScript from using a fragile, line-based JSON exceptions file to inline suppression markers, improving maintainability and reducing merge conflicts. The complexity ratchet now relies on stateless HEAD-vs-base diffs to grandfather pre-existing debt, with inline comments as the new mechanism for rare exceptions. Documentation is updated to reflect these changes, and related scripts and CI steps are simplified accordingly.
Migration to inline suppression markers:
code-complexity,code-lint, andcode-debtgates, making exceptions robust to reformatting and file moves; a non-empty reason is now required for each marker. [1] [2]complexity-baseline-exception.jsonand related update scripts are retired; the--exceptions-fileoption is now deprecated, and CI/scripts no longer reference it. [1] [2] [3]Documentation and workflow updates:
DESIGN.mddetails the rationale, design, and migration plan for inline suppressions;README.mdexplains how to use inline markers, the stateless grandfathering model, and how to handle exceptions in CI gates. [1] [2] [3]Summary of most important changes:
Migration to inline suppressions
code-<tool>-allow: <reason>markers for complexity, lint, and debt gates, replacing the fragile JSON exceptions file. [1] [2]Documentation and workflow
DESIGN.md) and update main docs to explain the new suppression mechanism and stateless grandfathering. [1] [2] [3]