Skip to main content

Linter rules

Every rule moddef lint can report. Codes are stable identifiers:

  • MDE***: errors; a document that trips one is invalid (exit code 1).
  • MDW***: warnings; advisory, the document still validates (exit code 0).
  • PARSE_*: schema-level parse failures (unknown field, bad enum, malformed oneof).

See §28 Validation Rules for the normative descriptions, and the moddef CLI for running the linter.

Generated from the conformance fixtures. 28 rules.

Errors

CodeDescription
MDE001Document doc_id missing
MDE002Document version missing
MDE003Duplicate device profile id
MDE004Duplicate point id within a device profile
MDE301Overlapping register mappings (not overlay)
MDE302Point falls outside its register block range
MDE304length_words set on COIL mapping
MDE402Enum reference does not resolve
MDE405Scale denominator is zero
MDE406Composed mapping base is zero
MDE101Unknown measurand base_quantity
MDE102Point unit incompatible with measurand canonical unit
MDE005Duplicate enum id
MDE006Duplicate struct id
MDE007Duplicate measurand id
MDE403Struct reference does not resolve
MDE404String storage missing length/encoding
MDE501Command point missing write semantics

Warnings

CodeDescription
MDW001Multi-word value missing byte/word order
MDW002Missing description
MDW101Unknown unit string
MDW003Duplicate human-readable names
MDW104Phase reference used for frequency
MDW301Suspicious 1-based Modicon address
MDW402Unused enum definition

Schema parse errors

CodeDescription
PARSE_ENUMInvalid enum value (access=READ)
PARSE_UNKNOWN_FIELDUnknown property (additionalProperties)
PARSE_ONEOFValueType with two oneof arms