Skip to content

Epic: JavaScript code-quality remediation (SonarCloud — ~72 findings) #440

Description

@don-petry

Epic — JavaScript code-quality remediation (SonarCloud)

Consolidates the SonarCloud code-quality debt in google-app-scripts into one tracked initiative so it can be scheduled as focused refactoring rather than firefought per-finding. All non-blocking (code quality, not security/correctness), so this is deliberate improvement work.

Child findings

Approach

  1. Land the CRITICAL cognitive-complexity ×4 (SonarCloud: reduce cognitive complexity (S3776, CRITICAL) (×4) #418) first — highest-risk-to-read functions; extract helpers, reduce nesting. Each function is a small self-contained PR with tests exercised.
  2. Batch the ×68 modernization (SonarCloud: JavaScript code-quality modernization (×68) #421) by rule family (one PR per rule/idiom, e.g. all var→const/let, then all template-literal conversions) so review stays mechanical and diffs are auditable.
  3. Fold SonarCloud: cognitive complexity (S3776) #427/SonarCloud: JavaScript/TypeScript code quality #428 into the passes above where they overlap.
  4. Route each batch to dev-lead as a scoped, single-rule task; keep behavior identical (no functional change), rely on the existing test suite as the guard.

Acceptance

  • SonarCloud code-quality issue count on this repo trends to 0 (or accepted-with-rationale for any false positives).
  • No behavior change; test suite green on each PR.
  • Cognitive-complexity CRITICAL findings cleared.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions