Skip to content

CodeQL 13: chore: additional style fixes (ternary, complex-block, implicit-conversion)#199

Open
rlorenzo wants to merge 1 commit into
mainfrom
codeql/13-final-sweep
Open

CodeQL 13: chore: additional style fixes (ternary, complex-block, implicit-conversion)#199
rlorenzo wants to merge 1 commit into
mainfrom
codeql/13-final-sweep

Conversation

@rlorenzo
Copy link
Copy Markdown
Contributor

@rlorenzo rlorenzo commented May 13, 2026

Summary

Final sweep of CodeQL style alerts that earlier PRs left as wontfix:

  • js/implicit-operand-conversion (2): course-import-dialog.test.ts:72,96 - narrow the union check by combining typeof === 'object' with instanceof Error, then explicit as Error cast on the truthy branch.
  • cs/complex-block (1): MeritMultiYearService.CalculateMedian - five for-loops appending to a List collapsed into chained Enumerable.Repeat(...).Concat(...).
  • cs/missed-ternary-operator (5) that were deferred:
    • GradYearClassLevel.cs:63 - case-4 if-else assignment
    • RotationsController.cs:63 - serviceId.HasValue ? GetRotationsByServiceAsync : GetRotationsAsync
    • UinformService.cs:247 - response.IsSuccessStatusCode ? Deserialize : new ErrorResponse
    • EffortAuditService.cs:605 - termCode-keyed IQueryable selection
    • Also picks up the earlier useless-tostring fix on GradYearClassLevel.cs:57,60,69 (no-op vs PR CodeQL 12: chore: style sweep for remaining CodeQL alerts #198 which has the same change).

Context

Thirteenth in the CodeQL N: cleanup series.

Test plan

  • npm run test:backend - 1946 tests passing
  • Pre-commit lint+test+verify all passed

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • review-ready

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: c0b8e73a-fac8-4b5e-b474-d22381c9fb99

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codeql/13-final-sweep

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter
Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 13, 2026

Codecov Report

❌ Patch coverage is 13.63636% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.97%. Comparing base (38de1ad) to head (8fc03de).

Files with missing lines Patch % Lines
web/Areas/Effort/Services/MeritMultiYearService.cs 0.00% 7 Missing ⚠️
web/Areas/Students/Services/GradYearClassLevel.cs 0.00% 5 Missing ⚠️
web/Areas/Effort/Services/EffortAuditService.cs 0.00% 4 Missing ⚠️
web/Areas/RAPS/Services/UinformService.cs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #199   +/-   ##
=======================================
  Coverage   42.96%   42.97%           
=======================================
  Files         877      877           
  Lines       51468    51450   -18     
  Branches     4802     4797    -5     
=======================================
- Hits        22113    22109    -4     
+ Misses      28831    28817   -14     
  Partials      524      524           
Flag Coverage Δ
backend 43.05% <13.63%> (+<0.01%) ⬆️
frontend 41.34% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

2 participants