- when: on_failure visual distinction: red circle (#d9534f), X-mark icon, dashed chip border, and Mermaid classDef; legend entry added - Job tooltip / detail panel: each chip wrapped in <g data-job="…"><title>…</title> <desc>…</desc> so SVG viewers and the HTML sidebar show stage, when, image, needs - Multi-job connector accuracy: classic mode now uses a bus-bar pattern (vertical rail at midpoint + per-job stubs) instead of one center-to-center line per stage pair - Blocked/skipped state colouring: RenderPipeline and pipelineSVG accept *cicontext.Context; skipped jobs rendered in grey (#868686) with dimmed text - Interactive HTML output (--format html): self-contained .html with inline SVG, mouse-wheel zoom, drag-to-pan, double-click reset, and a click-to-open sidebar - Mermaid pipeline output (--format mermaid): prints existing Pipeline() flowchart to stdout; suitable for mermaid.live or Markdown embedding - imageString() helper to extract image name from string or map form - 100% statement coverage maintained; 809 tests pass Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
glint
Disclaimer: This tool was built through iterative AI-assisted development with Claude. It is experimental, incomplete, and not intended for production use. Coverage of GitLab CI keywords is best-effort and may lag behind GitLab's evolving spec. Use it at your own discretion — no correctness guarantees are made. Contributions and bug reports are welcome.
A local tool to validate and lint .gitlab-ci.yml pipelines without needing a GitLab server.
What it does
- Lints — 43 rules covering pipeline structure, keyword constraints,
needs:/dependencies:graphs, expression reachability, and deprecations (GL001–GL043); runglint explain <ID>for any rule - Resolves includes — local files, HTTPS URLs, GitLab project templates, and CI/CD Catalog components, with offline cache support
- Simulates context —
--branch,--tag,--sourceflags evaluaterules:if:andonly/exceptto show which jobs would be active, manual, or skipped;--context branch=main --context branch=developprints a multi-column comparison table across multiple contexts in one run - Multiple output formats —
--format text(default, ruff-style),json,sarif(GitHub Code Scanning / GitLab SAST),junit,github(PR annotations) - Project config —
.glint.ymlfor rule suppression, severity overrides, token/URL defaults;# glint: ignore RULEfor per-job inline suppression - Graph visualization —
glint graphprints a terminal job tree;glint graph pipelinerenders a GitLab CI-style SVG/PNG;--format mermaidemits a Mermaid flowchart;--format htmlproduces a self-contained HTML file with pan/zoom and a job-detail sidebar; context flags grey out skipped jobs
See FEATURES.md for the complete feature reference and lint rules table, and ROADMAP.md for planned improvements.
Requirements
- Go 1.21 or later
- Task (optional, for development tasks)
Installation
git clone https://git.k3nny.fr/glint
cd glint
go build -o glint ./cmd/glint/...
Or with Task:
task build
Usage
glint [OPTIONS] <COMMAND>
Commands:
check Lint a pipeline file — exits 0 (clean) or 1 (errors found)
graph Visualise the pipeline as a job tree or Mermaid graph
explain Print description and fix for a lint rule
Run glint <command> --help for all flags. See USAGE.md for full
examples covering output formats, context simulation, remote includes, cache,
graph modes, and project configuration.
Development
This project uses Task as a task runner.
task # list available tasks
task build # compile the binary
task test # run Go unit tests
task lint-go # run go vet
task validate # run the binary against all testdata fixtures
task ci # full check: vet → test → build → validate
task build-windows # cross-compile for Windows x64 (requires a tagged commit → glint-<tag>.exe)
task build-linux # cross-compile for Linux x64 (requires a tagged commit → glint-<tag>-linux-amd64)
task clean # remove build artifacts
Project structure
.
├── cmd/glint/ # CLI entrypoint
├── internal/
│ ├── cicontext/ # CI variable context, rules:if: evaluator, job reachability
│ ├── fetcher/ # GitLab API client (project include fetching)
│ ├── graph/ # Mermaid and SVG/PNG graph generators
│ ├── linter/ # lint rules and findings
│ ├── model/ # pipeline data structures and YAML parser
│ └── resolver/ # extends: resolution and project include merging
├── testdata/ # sample pipelines used for manual validation
├── Taskfile.yml
└── go.mod
