package-defined
What it does
Section titled “What it does”Reports a file without a package statement.
Why it matters
Section titled “Why it matters”Without a package every name is global, so two files from different projects that define Order collide, and the generated code puts the types in the default namespace.
To fix, add a package statement.
Example
Section titled “Example”import public "google/protobuf/empty.proto";
message Old {...Configuration
Section titled “Configuration”protobuf: lint: rules: package-defined: warn # off (default), warn, errorEnabled by the presets: protobuf/buf-standard.
Suppress one line with sudsy-disable-next-line package-defined in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| buf | PACKAGE_DEFINED |
full |