Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add a `crossplane xrd lint` command

Open
#69 9 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #6385 by @undefinedhuman — closed without merging

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go, kubernetes, openapi

Research direction

Start at the crossplane xrd lint command and compare its intended scope with crossplane beta validate. Review the linked API design best-practices documentation and determine which XRD checks are in scope, including status requirements, array names, boolean enums, merge extensions, and field descriptions. Done means the command reports actionable lint findings for the agreed checks.

Written by the indexing model from the issue text.

Description

enhancement
What problem are you facing?

https://github.com/crossplane/docs/issues/564 tracks documenting best practices for API design. Put otherwise, best practices for writing XRDs. It occurred to me today that we could probably write a linter for a lot of these.

It could make sense for this to be part of crossplane beta validate too, but I think validation and linting are slightly different things. An XRD could have a valid OpenAPI schema, but one that we wouldn't recommend.

How could Crossplane help solve your problem?

Add a linter for XRDs. Some things to look for:

  • Overly restrictive status fields. Status fields aren't written by users, so they typically shouldn't be required, or generally validated beyond their type (e.g maximum integers, etc).
  • Arrays of objects missing a name field.
  • Boolean fields, which Kubernetes API conventions would typically recommend be enums.
  • Missing server-side apply merge OpenAPI extensions where we'd expect them.
  • General OpenAPI hygiene - fields missing descriptions etc
Dominant language
Go
Stars
19
Forks
31
Avg merge
2d 15h
Merged PRs (30d)
53

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from crossplane/cli

All issues in crossplane/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.