envelope / error
EL3012
envelope.trailing-data
Applies to: x12
What it catches and why it matters
Segments appear outside any interchange.
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).
IEA*1*000000001~NTE*ADD*EXTRA~
How to fix it
Move the extra segment into its intended transaction or remove an accidental suffix in the exporting system. Keep complete interchanges bounded by ISA and IEA.
False positives and limits
A transport wrapper appended outside X12 can trigger this rule. Remove the transport framing before linting the EDI payload.
Acknowledgments and suppression
Related acknowledgment codes (apply only to the described defect): TA1 code 022 (TA105): invalid control structure, for segments after the IEA Suppress the rule with --disable EL3012, 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/EL3012.html