Skip to content

fmtDelta: lowerIsBetter parameter is dead (both arrow branches identical) #10

Description

@rafaelvieiras

Problem

In fmtDelta, both branches of the arrow ternary are identical, so the lowerIsBetter parameter has no effect — the arrow reflects the numeric direction of change, not whether it is good or bad.

const arrow = lowerIsBetter
  ? (delta > 0 ? '↑' : '↓')
  : (delta > 0 ? '↑' : '↓');

Location

scripts/quality-gate.mjs:318-320 and the same block in src/generators/gate-script.mjs

Suggested fix

Either make the arrow indicate good/bad using lowerIsBetter, or drop the unused parameter. Remember to regenerate scripts/quality-gate.mjs from the generator.

Acceptance

  • No dead parameter; behavior intentional and tested.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions