Files
glint/testdata/keywords_invalid.yml
T
k3nnyandClaude Sonnet 4.6 986162d270
ci / vet, staticcheck, test, build (push) Successful in 8m44s
release / Build and publish release (push) Successful in 9m52s
feat(linter): add GL046-GL049 rules, AND-group support, and GL032 fix
- GL046: validate image/service pull_policy values (always, if-not-present, never)
- GL047: error when a variables.options default value is not in the options list
- GL048: error on unrecognised trigger.forward keys
- GL049: validate rules[n].allow_failure (bool or {exit_codes:} map)
- Parse and evaluate workflow.rules/job.rules nested-array AND-groups; crash
  on !!seq nodes is fixed; all members of a group must match for it to fire
- Add workflow.name and workflow.auto_cancel fields to Workflow struct
- Fix GL032 false positive: variables declared in any workflow rule's variables:
  block no longer trigger an undeclared-variable warning in sibling workflow
  rule if: expressions
- Add Windows ARM64 release build target (task build-windows-arm64)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-30 22:44:22 +02:00

183 lines
3.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
stages:
- build
- test
variables:
DEPLOY_ENV:
value: canary # ERROR: not listed in options
options:
- staging
- production
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
when: on_success # ERROR: workflow rules only allow always/never
bad-when-job:
stage: build
script:
- echo hello
when: whenever # ERROR: invalid when value
bad-delayed-job:
stage: build
script:
- echo hello
when: delayed # ERROR: missing start_in
bad-start-in-job:
stage: build
script:
- echo hello
start_in: 30 minutes # ERROR: start_in without when: delayed
bad-parallel-job:
stage: build
script:
- echo hello
parallel: 1 # ERROR: must be 2200
bad-retry-job:
stage: build
script:
- echo hello
retry: 5 # ERROR: must be 02
bad-retry-when-job:
stage: build
script:
- echo hello
retry:
max: 1
when: cosmic_ray # ERROR: invalid retry.when value
bad-allow-failure-job:
stage: build
script:
- echo hello
allow_failure:
bad_key: true # ERROR: map form must have exit_codes
bad-coverage-job:
stage: build
script:
- echo hello
coverage: "not-a-regex" # ERROR: must be wrapped in /
bad-release-job:
stage: build
script:
- echo hello
release:
description: "no tag" # ERROR: missing tag_name
bad-environment-job:
stage: test
script:
- echo hello
environment:
url: https://example.com # ERROR: url without name
bad-environment-action-job:
stage: test
script:
- echo hello
environment:
name: staging
action: dance # ERROR: invalid action value
bad-artifacts-when-job:
stage: build
script:
- echo hello
artifacts:
paths:
- dist/
when: sometimes # ERROR: invalid artifacts.when
bad-cache-policy-job:
stage: build
script:
- echo hello
cache:
paths:
- .cache/
policy: read-write # ERROR: invalid cache.policy
bad-dependencies-job:
stage: test
script:
- echo hello
dependencies:
- nonexistent-job # ERROR: unknown job
bad-dependencies-stage-job:
stage: build
script:
- echo hello
needs:
- test-job
dependencies:
- test-job # ERROR: test-job is in a later stage
test-job:
stage: test
script:
- echo test
bad-rule-when-job:
stage: build
script:
- echo hello
rules:
- if: '$CI_MERGE_REQUEST_ID'
when: sometimes # ERROR: invalid rules[0].when
bad-pull-policy-job:
stage: build
script:
- echo hello
image:
name: alpine
pull_policy: on-demand # ERROR: invalid pull_policy value
bad-pull-policy-service-job:
stage: build
script:
- echo hello
services:
- name: postgres:15
pull_policy: lazy # ERROR: invalid service pull_policy value
bad-trigger-forward-job:
trigger:
project: mygroup/myproject
forward:
all_variables: true # ERROR: unrecognised trigger.forward key
bad-trigger-forward-key2-job:
trigger:
include:
- artifact: child.yml
job: build
forward:
inherit: false # ERROR: unrecognised trigger.forward key
bad-rules-allow-failure-job:
stage: build
script:
- echo hello
rules:
- if: $CI_COMMIT_BRANCH
allow_failure: maybe # ERROR: invalid rules[0].allow_failure value
bad-rules-allow-failure-map-job:
stage: build
script:
- echo hello
rules:
- if: $CI_COMMIT_BRANCH
allow_failure:
codes: [1] # ERROR: map missing exit_codes key