Tool Chain/Lint
Tool Chain
Use ApiHug Lint to catch weak descriptions, missing metadata, and other contract-quality violations.
ApiHug Lint checks whether a contract is descriptive enough to support maintainable APIs, generated output, and AI-facing usage.
Lint is a rule-based quality pass for ApiHug protobuf projects. It focuses on documentation and modeling quality rather than code formatting.
Generated systems amplify weak contracts. Missing descriptions, vague field names, or thin API questions reduce both developer clarity and AI usefulness.
Use an ApiHug SDK version that includes lint support, then add a project-level .apihuglint.properties.
Common properties include:
| Property | Purpose |
|---|---|
violation.limit | fail when violations exceed the limit |
service.description.length | minimum service description length |
service.api.description.length | minimum operation description length |
service.api.questions.size | minimum prompt-question count |
message.field.description.length | minimum field description length |
entity.table.explicit | require explicit table names |
entity.column.explicit | require explicit column names |
After a successful proto build, reports are written to:
{PROTO_MODULE}/build/reports/api-lint/
Outputs:
report.html for human reviewreport.json for automation and CI integration[
{
"proto": "com/apihug/sample/proto/api/demo001/api.proto",
"kind": "Service",
"target": "VIPService#GetMeSth",
"rule": "Service method description too short",
"description": "Given [Get me something] expect >= 20"
}
]