Skip to main content

empty-file

Style
This rule is enabled as a warning by default.

What This Rule Does​

This rule checks for empty .zig files in the project. A file should be deemed empty if it has no content (zero bytes) or only comments and whitespace characters, as defined by the standard library in std.ascii.whitespace.

Examples​

Examples of incorrect code for this rule:

// an "empty" file is actually a file without meaningful code: just comments (doc or normal) or whitespace

Examples of correct code for this rule:

fn exampleFunction() void {
}

Configuration​

This rule has no configuration.