xml-header-missing (XML002)#

An XML file has no <?xml ... ?> declaration.

What it does#

Reports XML files that do not start with the XML declaration <?xml version="1.0" encoding="UTF-8" ?>.

Why is this bad?#

Without it, editors and tools have to guess the encoding, and the files of a module look different from each other.

Fix safety#

Safe: the declaration is added as the first line.

Opt-in#

ALL does not include this check, a matter of style that OCA’s CI does not run. Enable it with select = ["ALL", "XML002"].