Tool Chain

ApiHug Lint

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.

What It Is

Lint is a rule-based quality pass for ApiHug protobuf projects. It focuses on documentation and modeling quality rather than code formatting.

Why It Matters

Generated systems amplify weak contracts. Missing descriptions, vague field names, or thin API questions reduce both developer clarity and AI usefulness.

How It Fits

1. Enable the required version

Use an ApiHug SDK version that includes lint support, then add a project-level .apihuglint.properties.

2. Configure the rules

Common properties include:

PropertyPurpose
violation.limitfail when violations exceed the limit
service.description.lengthminimum service description length
service.api.description.lengthminimum operation description length
service.api.questions.sizeminimum prompt-question count
message.field.description.lengthminimum field description length
entity.table.explicitrequire explicit table names
entity.column.explicitrequire explicit column names

3. Read the output

After a successful proto build, reports are written to:

{PROTO_MODULE}/build/reports/api-lint/

Outputs:

  1. report.html for human review
  2. report.json for automation and CI integration

Example JSON finding

JSON
[
  {
    "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"
  }
]

Next Step

  1. Run lint as part of your proto build pipeline
  2. Pair it with Proto Review when you need human review on top of automated checks
Copyright © 2026 ApiHug·AI-native Enterprise Architecture Factory