Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ GITTENSORY_REVIEW_ENRICHMENT=false
# blameLink,approvalIntegrity,ciCheckSignals,undocumentedExport,staleBranch,commitHygiene
# pendingReviewRequests,testRatio,migrationSafety,looseRange,terminology,todoMarker,magicNumber
# conflictMarker,debugLeftover,sizeSmell,floatingPromise,deepNesting,errorSwallow,unsafeAny,a11y
# i18n,unusedExport,commitLint
# i18n,unusedExport,exhaustiveness,commitLint
#
# Profile defaults:
# fast: dependency,dependencyDiff,lockfileDrift,secret,license,installScript,heavyDependency
Expand All @@ -82,14 +82,14 @@ GITTENSORY_REVIEW_ENRICHMENT=false
# churnHotspot,blameLink,approvalIntegrity,ciCheckSignals,undocumentedExport,staleBranch
# commitHygiene,pendingReviewRequests,testRatio,migrationSafety,looseRange,terminology
# todoMarker,magicNumber,conflictMarker,debugLeftover,sizeSmell,floatingPromise,deepNesting
# errorSwallow,unsafeAny,a11y,i18n,unusedExport,commitLint
# errorSwallow,unsafeAny,a11y,i18n,unusedExport,exhaustiveness,commitLint
# deep: dependency,dependencyDiff,lockfileDrift,secret,license,installScript,heavyDependency
# hardcodedUrl,actionPin,eol,redos,provenance,codeowners,secretLog,assetWeight,typosquat
# commitSignature,iacMisconfig,nativeBuild,history,docCommentDrift,duplication,churnHotspot
# blameLink,approvalIntegrity,ciCheckSignals,undocumentedExport,staleBranch,commitHygiene
# pendingReviewRequests,testRatio,migrationSafety,looseRange,terminology,todoMarker,magicNumber
# conflictMarker,debugLeftover,sizeSmell,floatingPromise,deepNesting,errorSwallow,unsafeAny,a11y
# i18n,unusedExport,commitLint
# i18n,unusedExport,exhaustiveness,commitLint
# END GENERATED REES ANALYZERS

# Submitter-reputation spend control (internal-only): downgrades new/burst/low-rep
Expand Down
26 changes: 26 additions & 0 deletions apps/gittensory-ui/src/lib/rees-analyzers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,32 @@ export const REES_ANALYZERS = [
"Conservative: re-export lists and `export *` are ignored (same as undocumented-export). Skips symbols shorter than 3 chars. Checks same-file references in the headSha file before querying default-branch Code Search (where brand-new PR exports are usually absent). Fail-safe on search errors or incomplete results.",
},
},
{
name: "exhaustiveness",
title: "Enum/union exhaustiveness drift",
category: "quality",
cost: "github-light",
defaultEnabled: true,
profiles: ["balanced", "deep"],
requires: ["files", "github-token", "head-sha"],
limits: {
maxFiles: 10,
maxFetches: 10,
maxFindings: 25,
},
docs: {
summary:
"Flags when a PR adds a new enum member or string-literal union variant but an exhaustive switch still omits it.",
looksAt:
"Added enum/union members in changed TS/JS files, comparing pre-PR vs headSha member sets and scanning changed files for switches that covered all old members.",
reports:
"Type file, line, union/enum name, added member, and optional consumer file — never file contents.",
network:
"Bounded GitHub contents fetches at headSha for changed source files. Requires GitHub token forwarding for private repos.",
notes:
"Conservative: only explicit enum/union case labels; switches with a default branch are skipped. Fail-safe on fetch errors or ambiguous type parsing.",
},
},
{
name: "commitLint",
title: "Conventional-commit subjects",
Expand Down
28 changes: 28 additions & 0 deletions review-enrichment/analyzer-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,34 @@
"notes": "Conservative: re-export lists and `export *` are ignored (same as undocumented-export). Skips symbols shorter than 3 chars. Checks same-file references in the headSha file before querying default-branch Code Search (where brand-new PR exports are usually absent). Fail-safe on search errors or incomplete results."
}
},
{
"name": "exhaustiveness",
"title": "Enum/union exhaustiveness drift",
"category": "quality",
"cost": "github-light",
"defaultEnabled": true,
"profiles": [
"balanced",
"deep"
],
"requires": [
"files",
"github-token",
"head-sha"
],
"limits": {
"maxFiles": 10,
"maxFetches": 10,
"maxFindings": 25
},
"docs": {
"summary": "Flags when a PR adds a new enum member or string-literal union variant but an exhaustive switch still omits it.",
"looksAt": "Added enum/union members in changed TS/JS files, comparing pre-PR vs headSha member sets and scanning changed files for switches that covered all old members.",
"reports": "Type file, line, union/enum name, added member, and optional consumer file — never file contents.",
"network": "Bounded GitHub contents fetches at headSha for changed source files. Requires GitHub token forwarding for private repos.",
"notes": "Conservative: only explicit enum/union case labels; switches with a default branch are skipped. Fail-safe on fetch errors or ambiguous type parsing."
}
},
{
"name": "commitLint",
"title": "Conventional-commit subjects",
Expand Down
Loading
Loading