Skip to content

naming-convention-structure

Enforce naming convention on structures

INFO

☑️ The predefined configuration "mslint:recommended" enables this rule.

Rule details

This rule enforces a few naming conventions for #Struct directives:

  • All structure names must be prefixed with K_
  • Libraries can add another prefix before the K_ prefix, for example: MyLibPrefix_K_

Example of incorrect code for this rule:

maniascript
#Struct A {
  Integer A;
}
#Struct B::B as B
#Struct Lib_C {
  Integer C;
}

Example of correct code for this rule:

maniascript
#Struct K_A {
  Integer A;
}
#Struct B::B as K_B
#Struct Lib_K_C {
  Integer C;
}

Resources