Roll-up of low-volume HIGH/BLOCKER MAINTAINABILITY smells in our backend code.
Items
csharpsquid:S2699 (BLOCKER) — test has no assertion. SpikerSoft.Tests.Unit/Services/FileHashServicePerformanceTests.cs:173
csharpsquid:S2365 (CRITICAL) — property copies a collection on each access; convert ActionKeys to a method. SpikerSoft.Business/Domain/Activity/KnowledgeDomainRegistry.cs:17
csharpsquid:S3973 (CRITICAL) — use braces/indentation for the for body. SpikerSoft.Business/Domain/Lessons/Curriculum/Tier05_Collections/Lesson505_TwoDArray.cs:21
shelldre:S131 (CRITICAL) — add a default *) case to the case statement. SpikerSoft.Api/certs/generate-internal-certs.sh:313
javascript:S7761 (MAJOR ×2) — prefer .dataset over getAttribute(). SpikerSoft.Api/wwwroot/email-verified.html:692, 697
Check off as fixed.
Roll-up of low-volume HIGH/BLOCKER MAINTAINABILITY smells in our backend code.
## Items
- [ ] `csharpsquid:S2699` (BLOCKER) — test has no assertion. `SpikerSoft.Tests.Unit/Services/FileHashServicePerformanceTests.cs:173`
- [ ] `csharpsquid:S2365` (CRITICAL) — property copies a collection on each access; convert `ActionKeys` to a method. `SpikerSoft.Business/Domain/Activity/KnowledgeDomainRegistry.cs:17`
- [ ] `csharpsquid:S3973` (CRITICAL) — use braces/indentation for the `for` body. `SpikerSoft.Business/Domain/Lessons/Curriculum/Tier05_Collections/Lesson505_TwoDArray.cs:21`
- [ ] `shelldre:S131` (CRITICAL) — add a default `*)` case to the `case` statement. `SpikerSoft.Api/certs/generate-internal-certs.sh:313`
- [ ] `javascript:S3776` (CRITICAL ×2) — cognitive complexity 32 in inline script. `SpikerSoft.Api/wwwroot/email-verified.html:703, 1010`
- [ ] `javascript:S7761` (MAJOR ×2) — prefer `.dataset` over `getAttribute()`. `SpikerSoft.Api/wwwroot/email-verified.html:692, 697`
Check off as fixed.
Partially resolved in spikersoft-backend PR #12 (merged to master):
S2365 — ActionKeys converted to a cached GetActionKeys() method (+ 5 callers).
S3973 — braces added to the nested loop in Lesson505_TwoDArray.
S131 — default *) case added to generate-internal-certs.sh.
S7761 ×2 — dataset over getAttribute() in email-verified.html.
S2699 — timing assertions added to FileHashServicePerformanceTests.
Remaining (ticket stays open):
javascript:S3776 ×2 — cognitive complexity in the inline game JS at email-verified.html:703, 1010. Deferred from this mechanical pass; it needs a real refactor of that inline script.
Partially resolved in spikersoft-backend PR #12 (merged to `master`):
- [x] `S2365` — `ActionKeys` converted to a cached `GetActionKeys()` method (+ 5 callers).
- [x] `S3973` — braces added to the nested loop in `Lesson505_TwoDArray`.
- [x] `S131` — default `*)` case added to `generate-internal-certs.sh`.
- [x] `S7761` ×2 — `dataset` over `getAttribute()` in `email-verified.html`.
- [x] `S2699` — timing assertions added to `FileHashServicePerformanceTests`.
Remaining (ticket stays open):
- [ ] `javascript:S3776` ×2 — cognitive complexity in the inline game JS at `email-verified.html:703, 1010`. Deferred from this mechanical pass; it needs a real refactor of that inline script.
Last remaining items up for review in spikersoft-backend PR #46:
javascript:S3776 ×2 — email-verified.html:703 (handleMobileControl) and :1010 (handleKeyDown), both Cognitive Complexity 32 → within limit.
Both functions were duplicated portrait/landscape switch blocks where every branch applied the same "don't reverse into your own neck" rule; collapsed them into a key→direction lookup + two small shared helpers (remapDirection, applyDirection) reusing the existing areDirectionsOpposite guard. Behavior verified identical; SonarQube snippet analysis reports 0 issues. Will close this ticket once #46 merges — that completes all of #249's scope (the rest landed in backend PR #12).
Last remaining items up for review in spikersoft-backend PR #46:
- [x] `javascript:S3776` ×2 — `email-verified.html:703` (`handleMobileControl`) and `:1010` (`handleKeyDown`), both Cognitive Complexity 32 → within limit.
Both functions were duplicated portrait/landscape `switch` blocks where every branch applied the same "don't reverse into your own neck" rule; collapsed them into a key→direction lookup + two small shared helpers (`remapDirection`, `applyDirection`) reusing the existing `areDirectionsOpposite` guard. Behavior verified identical; SonarQube snippet analysis reports 0 issues. Will close this ticket once #46 merges — that completes all of #249's scope (the rest landed in backend PR #12).
Resolved in spikersoft-backend PR #46 (merged to master). Refactored the two javascript:S3776 cognitive-complexity functions in email-verified.html (handleMobileControl, handleKeyDown) from 32 down to within the limit via a key→direction lookup + shared remapDirection/applyDirection helpers. That completes all of #249's scope (the other items — S2365, S3973, S131, S7761×2, S2699 — landed earlier in backend PR #12). Closing.
Resolved in spikersoft-backend PR #46 (merged to `master`). Refactored the two `javascript:S3776` cognitive-complexity functions in `email-verified.html` (`handleMobileControl`, `handleKeyDown`) from 32 down to within the limit via a key→direction lookup + shared `remapDirection`/`applyDirection` helpers. That completes all of #249's scope (the other items — `S2365`, `S3973`, `S131`, `S7761`×2, `S2699` — landed earlier in backend PR #12). Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Roll-up of low-volume HIGH/BLOCKER MAINTAINABILITY smells in our backend code.
Items
csharpsquid:S2699(BLOCKER) — test has no assertion.SpikerSoft.Tests.Unit/Services/FileHashServicePerformanceTests.cs:173csharpsquid:S2365(CRITICAL) — property copies a collection on each access; convertActionKeysto a method.SpikerSoft.Business/Domain/Activity/KnowledgeDomainRegistry.cs:17csharpsquid:S3973(CRITICAL) — use braces/indentation for theforbody.SpikerSoft.Business/Domain/Lessons/Curriculum/Tier05_Collections/Lesson505_TwoDArray.cs:21shelldre:S131(CRITICAL) — add a default*)case to thecasestatement.SpikerSoft.Api/certs/generate-internal-certs.sh:313javascript:S3776(CRITICAL ×2) — cognitive complexity 32 in inline script.SpikerSoft.Api/wwwroot/email-verified.html:703, 1010javascript:S7761(MAJOR ×2) — prefer.datasetovergetAttribute().SpikerSoft.Api/wwwroot/email-verified.html:692, 697Check off as fixed.
Partially resolved in spikersoft-backend PR #12 (merged to
master):S2365—ActionKeysconverted to a cachedGetActionKeys()method (+ 5 callers).S3973— braces added to the nested loop inLesson505_TwoDArray.S131— default*)case added togenerate-internal-certs.sh.S7761×2 —datasetovergetAttribute()inemail-verified.html.S2699— timing assertions added toFileHashServicePerformanceTests.Remaining (ticket stays open):
javascript:S3776×2 — cognitive complexity in the inline game JS atemail-verified.html:703, 1010. Deferred from this mechanical pass; it needs a real refactor of that inline script.Last remaining items up for review in spikersoft-backend PR #46:
javascript:S3776×2 —email-verified.html:703(handleMobileControl) and:1010(handleKeyDown), both Cognitive Complexity 32 → within limit.Both functions were duplicated portrait/landscape
switchblocks where every branch applied the same "don't reverse into your own neck" rule; collapsed them into a key→direction lookup + two small shared helpers (remapDirection,applyDirection) reusing the existingareDirectionsOppositeguard. Behavior verified identical; SonarQube snippet analysis reports 0 issues. Will close this ticket once #46 merges — that completes all of #249's scope (the rest landed in backend PR #12).Resolved in spikersoft-backend PR #46 (merged to
master). Refactored the twojavascript:S3776cognitive-complexity functions inemail-verified.html(handleMobileControl,handleKeyDown) from 32 down to within the limit via a key→direction lookup + sharedremapDirection/applyDirectionhelpers. That completes all of #249's scope (the other items —S2365,S3973,S131,S7761×2,S2699— landed earlier in backend PR #12). Closing.