Linting rules
S005: message-should-be-named
Checks for messages created with `createMessage(...)` but named as generic `msg` or `message`.
Metadata
Code:S005Rule:message-should-be-namedStatus: Stable sincev0.0.1Quick fix: not available
What it does
Checks for messages created with createMessage(...) but named as generic
msg or message.
Why is this bad?
Messages are first-class entities in Tolk and should have meaningful names.
Generic names like msg and message make code harder to read and reason
about.
Example
val msg = createMessage({ ... });msg.send(SEND_MODE_REGULAR);Use instead:
val deployMessage = createMessage({ ... });
deployMessage.send(SEND_MODE_REGULAR);Behavior notes
The rule checks local variables named exactly msg or message whose
initializer resolves to createMessage(...).
Last updated on