Acton
Linting rules

E011: message-should-be-named

Checks for messages created with `createMessage(...)` but named as generic `msg`.

Metadata

  • Code: E011
  • Rule: message-should-be-named
  • Status: Stable since v0.0.1
  • Quick fix: not available

What it does

Checks for messages created with createMessage(...) but named as generic msg.

Why is this bad?

Messages are first-class entities in Tolk and should have meaningful names. Generic names like msg make code harder to read and reason about.

Example

val msg = createMessage({ ... });
E011: message should be properly named
msg.send(SEND_MODE_REGULAR);

Use instead:

val deployMessage = createMessage({ ... });
deployMessage.send(SEND_MODE_REGULAR);
Source code

Last updated on

On this page