Skip to content

Add code complexity report and quality checks with ratcheting cap#2597

Merged
robgruen merged 16 commits into
mainfrom
dev/robgruen/code_complexity
Jul 6, 2026
Merged

Add code complexity report and quality checks with ratcheting cap#2597
robgruen merged 16 commits into
mainfrom
dev/robgruen/code_complexity

Conversation

@robgruen

@robgruen robgruen commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces automated quality gates and reporting for TypeScript code by adding new scripts, dependencies, and CI workflow steps. These changes enforce stricter code quality standards on pull requests, including complexity, lint, circular dependencies, and test debt, while also ensuring generated reports are properly ignored in version control.

CI Workflow Enhancements:

  • Added new PR-only gates in .github/workflows/build-ts.yml to automatically check for increases in code complexity, lint errors, circular dependencies, and test debt compared to the base branch. These steps use new scripts and enforce that quality metrics can only improve or stay the same over time.

New Scripts and Reporting:

  • Added several new npm scripts in ts/package.json for code quality checks and report generation, including code-complexity, code-lint, code-circular, code-debt, and others. These scripts run TypeScript-based tools to generate reports and enforce gates.
  • Added a starter knip.jsonc config file for dead code analysis, supporting the new dead code report script.

Dependency Updates:

  • Introduced new devDependencies for code quality tooling in both ts/package.json and ts/tools/package.json, including eslint, eslint-plugin-sonarjs, jscpd, knip, madge, and typescript-eslint. [1] [2]
  • Updated the list of optional dependencies in ts/package.json, replacing protobufjs with onnxruntime-node.

.gitignore Updates:

  • Updated ts/.gitignore to exclude all generated code quality report outputs from version control, preventing accidental commits of large or sensitive report files.

Comment thread ts/tools/scripts/code/complexityReport.ts Fixed
Comment thread ts/tools/scripts/code/complexityReport.ts Fixed
Comment thread ts/tools/scripts/code/complexityReport.ts Fixed
Comment thread ts/tools/scripts/code/complexityReport.ts Fixed
Comment thread ts/tools/scripts/code/complexityReport.ts Fixed
@robgruen robgruen marked this pull request as ready for review July 6, 2026 19:10
@robgruen robgruen added this pull request to the merge queue Jul 6, 2026
Merged via the queue into main with commit 16a6956 Jul 6, 2026
26 of 30 checks passed
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.

3 participants