Skip to content

Severity Configuration

[severity]

Control the severity level of each violation type.

KeyDefaultDescription
dependency_violation"error"Layer dependency rule violated
external_violation"error"External library rule violated
call_pattern_violation"error"DI entrypoint method call rule violated
unknown_import"warning"Import that could not be classified
naming_violation"error"Naming convention rule violated (name_deny)
[severity]
dependency_violation = "warning" # downgrade for gradual adoption
external_violation = "error"
call_pattern_violation = "error"
unknown_import = "warning"
naming_violation = "error"

Combining with --fail-on

Terminal window
mille check # exit 1 on error only (default)
mille check --fail-on warning # exit 1 on warning or error
mille check --fail-on error # same as default

Exit Codes

CodeMeaning
0No violations (or only warnings without --fail-on warning)
1One or more violations at the configured threshold
3Configuration file error