diff --git a/FEATURES.md b/FEATURES.md index 89b2255..322e4c8 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -317,10 +317,10 @@ jobs or pipeline-level findings. | Mode | Output | |------|--------| -| `tree` (default) | Terminal job tree: stages as branches, jobs as leaves; annotated with `[manual]`, `[delayed]`, `[trigger]` where applicable | -| `includes` | Mermaid flowchart to stdout; colour-coded nodes by include type (local, remote, project, component, template) | +| `tree` *(default)* | Terminal job tree: stages as branches, jobs as leaves; annotated with `[manual]`, `[delayed]`, `[trigger]` where applicable | +| `includes` | Mermaid flowchart of include dependencies to stdout; colour-coded by include type (local, remote, project, component, template) | | `pipeline` | GitLab CI-style SVG/PNG written to `--out` directory (default: `glint-out/`); converted to PNG when `rsvg-convert`, `inkscape`, or `magick` is available | -| `all` | `includes` to stdout + `pipeline` file path to stderr | +| `all` | `includes` Mermaid to stdout + `pipeline` SVG/PNG path to stderr | **`glint graph pipeline --format `** diff --git a/README.md b/README.md index 11b5ba2..9c5d355 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ A local tool to validate and lint `.gitlab-ci.yml` pipelines without needing a G - **Simulates context** — `--branch`, `--tag`, `--source` flags evaluate `rules:if:` and `only`/`except` to show which jobs would be active, manual, or skipped; `--context branch=main --context branch=develop` prints a multi-column comparison table across multiple contexts in one run - **Multiple output formats** — `--format text` (default, colorized and column-aligned), `json`, `sarif` (GitHub Code Scanning / GitLab SAST), `junit`, `github` (PR annotations); exits `2` on errors, `10` on warnings only - **Project config** — `.glint.yml` for rule suppression, severity overrides, token/URL/proxy defaults; `# glint: ignore RULE` for per-job inline suppression; `--no-warn` flag to suppress all warnings -- **Graph visualization** — `glint graph` prints a terminal job tree; `glint graph pipeline` renders a GitLab CI-style SVG/PNG; `--format mermaid` emits a Mermaid flowchart; `--format html` produces a self-contained HTML file with pan/zoom and a job-detail sidebar; `--no-skipped` hides jobs that would not run in the given context +- **Graph visualization** — `glint graph` prints a terminal job tree (default); `glint graph includes` emits a Mermaid include-dependency graph; `glint graph pipeline` renders a GitLab CI-style SVG/PNG; `--format mermaid` or `--format html` for alternative pipeline output; `--no-skipped` hides jobs that would not run in the given context - **LSP server** — `glint lsp` starts a Language Server Protocol server over stdin/stdout; connect with any LSP client to get inline diagnostics (rule ID as code, error/warning severity) in VS Code, Neovim, Emacs, JetBrains, etc. - **VS Code extension** — `editors/vscode/` wraps the LSP server; inline squiggles for every glint rule directly in the editor diff --git a/cmd/glint/main.go b/cmd/glint/main.go index c984f8f..449610b 100644 --- a/cmd/glint/main.go +++ b/cmd/glint/main.go @@ -498,12 +498,12 @@ func cmdGraph(args []string) { format := fs.String("format", "svg", "pipeline output format: svg, mermaid, or html") fs.Usage = func() { fmt.Fprintf(os.Stderr, "glint %s\n\n", version) - fmt.Fprint(os.Stderr, `Visualise the pipeline as a job tree and/or Mermaid graph. + fmt.Fprint(os.Stderr, `Visualise the pipeline as a job tree or graph. Usage: glint graph [MODE] [OPTIONS] Arguments: - [MODE] Graph mode; must appear before options [default: tree+includes] + [MODE] Graph mode; must appear before options [default: tree] [possible values: tree, includes, pipeline, all] Path to the .gitlab-ci.yml file @@ -592,11 +592,11 @@ always evaluated. Examples: glint graph .gitlab-ci.yml glint graph tree .gitlab-ci.yml + glint graph includes .gitlab-ci.yml > includes.mmd glint graph tree --branch develop .gitlab-ci.yml glint graph tree --tag v1.0.0 .gitlab-ci.yml glint graph tree --list-vars .gitlab-ci.yml glint graph tree --changes src/main.go .gitlab-ci.yml - glint graph includes .gitlab-ci.yml > includes.mmd glint graph pipeline .gitlab-ci.yml glint graph pipeline --out /tmp/graphs .gitlab-ci.yml glint graph pipeline --format mermaid .gitlab-ci.yml @@ -709,11 +709,7 @@ Examples: } switch mode { - case "default": - fmt.Print(graph.Tree(p, ctx)) - fmt.Println("---") - fmt.Print(graph.Includes(path, p.Include, cfg)) - case "tree": + case "default", "tree": fmt.Print(graph.Tree(p, ctx)) case "includes": fmt.Print(graph.Includes(path, p.Include, cfg))