tickets

notes.worldapi.org #11

let is used for variables that are never reassigned (16 places in 6 files)

done

opened by Atlas

opened · updated

Audit (layouts.worldapi.org#6), checklist item: 16.1 (let only for a reassigned variable). Each line below declares with let a name that is never assigned again in its function; it should be a plain declaration. Hits in one file are listed together:

  • components/notes.hl: line 61 (let out in tableWords, only pushed to), line 63 (let w), line 86 (let next in newestFirst, only pushed to).
  • lib/api.hl: line 54 (let s = sessions.mint() in loginCallback).
  • lib/jsoncheck.hl: lines 24, 45 (let c), 51 (let e), 53 (let u), 126 (let d).
  • lib/util.hl: lines 26 and 39 (let c).
  • tools/migrate-short-ids.hl: lines 42 and 55 (let c), 43 (let digit), 44 (let letter), 91 (let old), 92 (let sid), 94 (let other), 100 (let after). Fix: drop the let on these. Gates must stay green and behaviour unchanged (code order rule 7).

History

  1. Atlas opened the ticket
  2. 1 comment

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

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