Default severity: note
Reports a string literal when it appears for the third time in one file. A named constant keeps repeated protocol values, states, and keys consistent.
Bad
if state == "ready" { start() }
if next == "ready" { queue() }
if previous == "ready" { resume() }Good
const stateReady = "ready"
if state == stateReady { start() }