Repository navigation
Fix the remaining SonarQube findings and give the scan real types - #1398
Merged
Merged
Conversation
- keep empty-string fallbacks but spell them without || (length checks, a small orDefault helper) or use ?? where the value is never empty - optional chains in modUtils and tents, boolean list in timer - split removeReactionRole into two paths instead of branching on a boolean - listFeeds no longer returns a constant; narrower types for the audit-log unit formatter - drop redundant assertions that TypeScript doesn't need - install dependencies and generate the Prisma clients in the SonarScan jobs (uat and main) so type-aware rules see discord.js/Prisma types instead of reporting casts as unnecessary Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Summary
Follow-up to #1397 for the findings Sonar still reports on
main.||are spelled with length checks or a smallorDefaulthelper (so/hr, quotes, deleted messages and mod history still fall back on empty text);??is used where the value is never empty.modUtils/tents, a boolean list in the voice-exp check, a rate-limit sublimit of 0 still falls back to the retry delay.removeReactionRoleis split into two paths instead of branching on a boolean;listFeedsno longer returns a constant; narrower types for the audit-log unit formatter; redundant assertions removed.PushToUat.ymlandPushToMain.ymlnow runnpm ci --legacy-peer-depsandnpm run db:generatefirst. Without dependencies the scanner couldn't see discord.js/Prisma types, so it reported ~22 casts that TypeScript actually requires as "unnecessary" (S4325).Verification
tsc(app and vitest configs), ESLint on changed files: clean.npx vitest run --coverage: 2,264 passed, coverage 100%.🤖 Generated with Claude Code