kubernetes-sigs/cluster-api

API Linting Tracker (Phase 2)

Open

#11,967 opened on Mar 13, 2025

View on GitHub
 (8 comments) (1 reaction) (1 assignee)Go (1,532 forks)auto 404
help wantedkind/api-changepriority/important-soontriage/accepted

Repository metrics

Stars
 (4,267 stars)
PR merge metrics
 (PR metrics pending)

Description

As a follow up to https://github.com/kubernetes-sigs/cluster-api/issues/11834

This issue tracks upcoming linters from KAL and their current status, so that we can track the new rules as they are implemented and get them enabled within CAPI.

For more detailed information and tracking, follow https://github.com/JoelSpeed/kal/issues/1

Rule Description Implemented Enabled
nomaps Maps of objects should not be allowed True False
enums Enums are correctly tagged and use PascalCase False False
numericbounds Numeric fields should have upper and lower bounds False False
optionalfields Optional fields should have omitempty and usually be pointers True False
defaults Default values should use the upstream default marker False False
markertypos Checks for common typos in markers False False
nodurations Durations should be avoided, instead use an integer with a unit in the name True False
noreferences Fields should use Ref(s) instead of Reference(s) True False
timestamps Do not use Timestamp in field names, use only Time True False
nameformats Common name fields (name/namespace) should use CEL format library to validate format False False
arrayofstruct Arrays of structs must have at least one required field True False
duplicatemarkers Checks for duplicate markers (eg enum twice on field and type) True False
typeandobjectmeta Enforces consistent standards for typemeta and objectmeta fields False False
statusoptional Top level status fields should all be optional True False
ssatags All lists must be marked with a listType True False

Tasks:

Contributor guide