class

Krikri::Lint::SchemaMetaRule

Inherits Krikri::Lint::Rule < Reference < Object

Upstream parity: ansible-lint's schema[meta] (severity VERY_HIGH, tags core; profile basic). Validates a role's meta/main.yml against our own JSON Schema (written from the public Galaxy metadata docs) with a minimal Draft-07 validator (see json_schema.cr). Fires only in role context, like upstream; reported at file start with no column.

Constants

DETAILS = " Errors from schema validation do not include exact line numbers.\nThe schema name appears as a tag, like ``schema[meta]``.\n\nThis rule cannot be skipped and stops further processing of the file.\n\nIf the wrong schema was picked, either:\n\n* move the file to its standard location so it is detected correctly.\n* use ``kinds:`` in the linter config to set the file type.\n"

Printed as the match's details: schema errors carry no line numbers, and the rule is not skippable.

SCHEMA = JSON.parse(SCHEMA_TEXT)
SCHEMA_TEXT = {{ read_file("/tmp/tmp.bHaNBJ/src/src/krikri_lint/rules/../schemas/meta.json") }}

Instance methods

applies_to
Source
check(file : PositionedFile, violations : Array(Violation)) : Nil
Source
severity
Source
tags
Source