edifact / error
EL7008
edifact.nesting
Applies to: edifact
What it catches and why it matters
UNG or UNH appears outside the envelope that must enclose it, or no UNB is present in a file forced to the edifact format.
Failing example
These synthetic fragments illustrate the defect; they are not complete interchange files. Backslash escapes name bytes such as \r (CR) and \n (LF).
UNH+1+INVOIC:D:96A:UN'UNT+2+1' (no enclosing UNB)
How to fix it
Place messages and groups inside the required interchange envelope, or lint the complete interchange instead of a standalone fragment.
False positives and limits
Forcing --type edifact on another format, or checking only an extracted message, can trigger missing-envelope findings. Confirm the input scope and format.
Acknowledgments and suppression
No direct acknowledgment code is mapped for this rule. CONTRL references use syntax-error element 0085, not action element 0083. UCI, UCF and UCM report interchange, group and message service-segment errors respectively. A missing or unreadable header can prevent a valid CONTRL response. Truncation, orphaned envelopes and data outside an interchange have no single mapping here. Sources: https://service.gefeg.com/jwg1/Archive/v3/mt/m01.htm https://service.gefeg.com/jwg1/Archive/cl/v3/21a/cl16.htm Suppress the rule with --disable EL7008, or list it under "disable" in .edilint.yml. To accept the occurrences a file already has without suppressing the rule, record them with --write-baseline and run with --baseline. Reference: https://crb2nu.github.io/edilint/rules/EL7008.html