Acton
Linting rules

S001: name-case-checker

Checks identifier naming style and suggests consistent casing.

Metadata

  • Code: S001
  • Rule: name-case-checker
  • Status: Stable since v0.0.1
  • Quick fix: always available

What it does

Checks identifier naming style and suggests consistent casing.

Why is this bad?

Inconsistent naming makes code harder to read and maintain. This rule enforces:

  • camelCase for variables, functions, methods, and struct fields
  • PascalCase for structs, enums, enum members, and type aliases
  • SCREAMING_SNAKE_CASE for constants

Example

struct low_struct {
S001: name should be in the expected case
TheBad: int
S001: name should be in the expected case
} const iAmConst_variable = 1
S001: name should be in the expected case
fun BadFunctionName() {}
S001: name should be in the expected case

Use instead:

struct LowStruct {
    theBad: int
}

const I_AM_CONST_VARIABLE = 1

fun badFunctionName() {}
Source code

Last updated on

On this page