A header has no include guard and no #pragma once

tx0/c:missing-include-guardstrictwarningmaintainability

What it finds

A header without a guard declares everything again when it is included twice, which fails for type definitions. #ifndef NAME_H and #define NAME_H around the contents, or #pragma once, include it once.

The first directive must be #ifndef or #if !defined followed by a #define, or some directive must be #pragma once; headers without declarations are left alone.

From the rule's source, missing_include_guard.rs.

Turn it on, off or suppress it

The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/c:missing-include-guard" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/c:missing-include-guard] reason="..."

tx0 explain tx0/c:missing-include-guard shows the same in the terminal. Found a false positive? Report it.