← Back to issue list

Add linter to check charm's categories

View original Github issue

Metadata

Project
charmcraft
Number
#607
Type
issue
State
closed
Author
heitorPB
Labels
—
Created
Updated
Closed

Current evaluation

Category validation was abandoned after metadata tags and categories were deprecated; Charmcraft would not inspect Juju YAML without official schemas.

Resolution: closed stale

Reason: On March 7, 2022, facundobatista closed the issue, stating Charmcraft was not planning to validate Juju YAML contents unless schemas were provided. No implementing PR or commit was identified.

Evaluated by: mr-cal-bot

No scores available.

Issue body

According to https://github.com/canonical-web-and-design/charmhub.io/issues/1171#issuecomment-976579707, CharmHub uses the `categories` keyword in the metadata to enable the search filters on the search page. It would be nice if Charmcraft could validate the categories in the `metadata.yaml`. The list of CharmHub categories today: ``` ai-ml big-data cloud containers databases logging-tracing monitoring networking security storage ``` I think `charmcraft` should issue a warning (not an error) if the charm contains a category outside this list. What are your thoughts on this?

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed stale Category validation was abandoned after metadata tags and categories were deprecated; Charmcraft would not inspect Juju YAML without official schemas.
stealth/space-bunny-alpha — closed stale Category validation was abandoned: maintainers declined to lint Juju YAML contents, including deprecated categories and tags, without official schemas.
stealth/space-bunny-alpha — closed stale Category validation was abandoned: maintainers decided not to verify Juju YAML contents, including deprecated categories and tags, without official schemas.
qwen3.6-35b-a3b-mtp-q6 — — Rejected. The maintainer closed the issue, stating charmcraft will not verify Juju YAML contents like deprecated categories and tags without official schemas. The request was abandoned.
qwen/qwen3.6-35b-a3b — — Closed as rejected. The categories and tags fields were deprecated and removed from metadata.yaml. Maintainers declined to add validation, stating no plans to verify Juju YAML contents without official schemas.
qwen3.6-35b-a3b-mtp-q6 — — Closed without implementation. The categories and tags fields were deprecated and removed from metadata.yaml. Maintainers declined to add validation, stating they will not verify Juju YAML contents unless official schemas are provided.

Update history

No update history recorded yet.

Related work

  • Related To: charmhub.io#1171 (confidence 95%)

    The original report explaining CharmHub's category metadata is cited in #607.

Related issues

Issue Project State Summary Similarity
#492 Add linter to verify that the charm's metadata is v2 charmcraft closed Closed as obsolete because Charmcraft now generates charm metadata automatically, making the proposed v2 metadata linter unnecessary.
74%
#449 Added a linter to verify that the metadata is ok (CRAFT-322). charmcraft merged Merged PR #449 (commit ccc10f3e), adding a linter to validate charm metadata; packing-time enforcement was intentionally deferred.
70%
#310 Charmcraft should validate all yaml files when building a charm charmcraft closed Malformed actions.yaml and config.yaml are now rejected during builds; PR #556 added Juju YAML linters in merge commit a585aec6.
70%