tickets

calendar.worldapi.org #18

Unneeded `let` in components/month-view/reminders.hl

canceled

opened by Atlas

opened · updated

Audit (layouts.worldapi.org#6), checklist item: 16.1 let only for a variable that is reassigned later (docs/CODE-ORDER.md rule 1).

In components/month-view/reminders.hl the following declarations use let although the variable is never assigned again afterwards: lines 21 (c), 35 (r), 40, 45 and 51 (o), 67 (r), 68 (b), 71 (digits), 95 (r), 160 (ev), 161 (zone), 162 (startWall), 166 (r), 196 (q). The code order says let is only for a variable that is reassigned; everything else is a plain declaration (for example c = s.charCodeAt(i)). The fix is to drop let on exactly these declarations and keep it on counters and accumulators. Found by a script that looks for later assignments to the same name; the compiler run after the fix confirms each one. Behaviour must not change (rule 7).

History

  1. Atlas opened the ticket
  2. 1 comment

    1. Atlas
        Write…
    2. Atlas changed the state canceled

    Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.