{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/gechr/clover/main/internal/config/schema.json", "title": "clover configuration", "description": "Schema for Clover YAML configuration (.clover.yaml / .clover.yml and the user config.yaml).", "type": [ "object", "null" ], "properties": { "required-version": { "type": "string", "description": "Version constraint the running clover must satisfy (e.g. \">=0.1.0\", \"~>0.1\")." }, "paths": { "type": "object", "description": "Which paths clover scans.", "properties": { "exclude": { "type": "array", "description": "Doublestar globs excluded from scanning (e.g. \"vendor/**\", \"**/testdata/**\").", "items": { "type": "string", "minLength": 1 } } } }, "global": { "type": "object", "description": "Cross-command defaults; a per-command block overrides these.", "properties": { "output": { "$ref": "#/$defs/output" } } }, "run": { "type": "object", "description": "Defaults for `clover run`.", "properties": { "verify": { "type": "boolean", "description": "Verify secure pins against their upstream tags by default (implies a deep lookup)." }, "prerelease": { "type": "boolean", "description": "Allow selecting prerelease versions by default." }, "downgrade": { "type": "boolean", "description": "Allow selecting versions older than the current one by default." }, "deep": { "type": "boolean", "description": "Follow pagination to fetch every version by default (more accurate, but slower)." }, "force": { "type": "boolean", "description": "Re-pin a followed digest even when the version it follows is unchanged." }, "cache": { "type": "boolean", "description": "Persist cacheable HTTP responses across runs and revalidate them with conditional requests (default true)." }, "cooldown": { "type": "string", "description": "Default minimum age before a version is eligible, for directives that set no cooldown of their own (e.g. 72h, 2w)." }, "output": { "$ref": "#/$defs/output" }, "rules": { "type": "array", "description": "Scoped defaults. Each rule applies its settings to the markers its selectors match. For each setting, the first matching rule that sets it wins, falling back to the run defaults above.", "items": { "$ref": "#/$defs/rule" } } } }, "lint": { "type": "object", "description": "Defaults for `clover lint`.", "properties": { "output": { "$ref": "#/$defs/output" } } }, "fmt": { "type": "object", "description": "Defaults for `clover fmt`.", "properties": { "prune": { "type": "boolean", "description": "Remove unknown directive keys instead of erroring on them." } } }, "annotate": { "type": "object", "description": "Defaults for `clover annotate`.", "properties": { "write": { "type": "boolean", "description": "Apply proposed annotations by default instead of previewing them." }, "check": { "type": "boolean", "description": "Report annotations that would be added and exit non-zero by default." }, "sidecar": { "type": "boolean", "description": "Generate sidecars for comment-less targets (false leaves them untouched)." } } } }, "$defs": { "rule": { "type": "object", "description": "One scoped default: selectors (paths, providers, tags) choose the markers it governs, and the remaining keys supply their defaults. At least one selector and one setting are required.", "properties": { "paths": { "type": "array", "description": "Doublestar globs matched against the marker file's path relative to its repository root (e.g. \"vendor/**\"). Any match selects the marker.", "items": { "type": "string", "minLength": 1 } }, "providers": { "type": "array", "description": "Provider names the rule applies to (e.g. \"docker\", \"github\"). Any match selects the marker.", "items": { "type": "string", "minLength": 1 } }, "tags": { "type": "array", "description": "Tags the marker must all carry (its directive's tags= value).", "items": { "type": "string", "minLength": 1 } }, "verify": { "type": "boolean", "description": "Verify secure pins against their upstream tags (implies a deep lookup)." }, "prerelease": { "type": "boolean", "description": "Allow selecting prerelease versions." }, "downgrade": { "type": "boolean", "description": "Allow selecting versions older than the current one." }, "deep": { "type": "boolean", "description": "Follow pagination to fetch every version (more accurate, but slower)." }, "force": { "type": "boolean", "description": "Re-pin a followed digest even when the version it follows is unchanged." }, "cooldown": { "type": "string", "description": "Minimum age before a version is eligible, for directives that set no cooldown of their own (e.g. 72h, 2w)." } } }, "output": { "type": "string", "enum": [ "text", "wide", "github" ], "description": "Output detail: \"text\" (concise), \"wide\" (every marker), or \"github\" (GitHub Actions annotations)." } } }