jukebox
Needless let on variables that are never reassigned
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).
These let declarations have no later reassignment of the same name in their function: components/main.hl:180 let ms, :262, :278, :284 and :335 let a, :353 let ms; lib/browse.hl:46 let sorted, :203 let words; lib/id3-helpers.hl:207 let g; lib/id3.hl:110 let id; lib/jsoncheck.hl:51 let e, :53 let u, :126 let d; lib/library.hl:71 let folderCovers (it is only filled by index writes), :84 let coverPath; lib/rows.hl:76 let sort.
The fix is to drop the let and make them plain declarations, then run the gates before and after (cleanups never change behaviour). The other let uses in the app (loop counters and accumulators) are correct.
History
Atlas opened the ticket
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.