Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4972adb213 |
@@ -33,6 +33,11 @@ coverage.txt
|
||||
*.swo
|
||||
*~
|
||||
|
||||
# VS Code extension build artifacts
|
||||
editors/vscode/node_modules/
|
||||
editors/vscode/out/
|
||||
editors/vscode/*.vsix
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
This project uses [Semantic Versioning](https://semver.org).
|
||||
|
||||
## [0.2.30] - 2026-06-26
|
||||
|
||||
### Added
|
||||
|
||||
- **VS Code extension** (`editors/vscode/`) — TypeScript extension that starts `glint lsp` as a language server and connects to it via `vscode-languageclient`. Activates on YAML files; the `documentSelector` restricts LSP processing to `**/.gitlab-ci.yml` so other YAML files are unaffected. Inline error/warning squiggles appear on every save or edit. The `glint.executablePath` setting controls the binary path (default: `glint` on `PATH`). Build: `task ext-compile`; package as `.vsix`: `task ext-package`.
|
||||
|
||||
## [0.2.29] - 2026-06-26
|
||||
|
||||
### Added
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<p align="center">
|
||||
<a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="License"></a>
|
||||
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/release-v0.2.29-blue.svg" alt="Release"></a>
|
||||
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/release-v0.2.30-blue.svg" alt="Release"></a>
|
||||
</p>
|
||||
|
||||
> **Disclaimer:** This tool was built through iterative AI-assisted development with [Claude](https://claude.ai). 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.
|
||||
@@ -22,6 +22,7 @@ A local tool to validate and lint `.gitlab-ci.yml` pipelines without needing a G
|
||||
- **Project config** — `.glint.yml` for rule suppression, severity overrides, token/URL defaults; `# glint: ignore RULE` for per-job inline suppression
|
||||
- **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; context flags grey out skipped jobs
|
||||
- **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
|
||||
|
||||
See [FEATURES.md](FEATURES.md) for the complete feature reference and lint rules table, and [ROADMAP.md](ROADMAP.md) for planned improvements.
|
||||
|
||||
@@ -108,6 +109,27 @@ Copy [`action.yml`](action.yml) from this repository, or mirror this repo to Git
|
||||
|
||||
The action downloads the glint Linux binary into `$RUNNER_TEMP` and runs `glint check`. Only Linux runners are supported (matches the available release binary).
|
||||
|
||||
### VS Code extension
|
||||
|
||||
Clone this repository and load the extension from `editors/vscode/`:
|
||||
|
||||
```bash
|
||||
cd editors/vscode
|
||||
npm install # install dependencies (once)
|
||||
npm run compile # compile TypeScript → out/
|
||||
```
|
||||
|
||||
Then in VS Code: **Run → Start Debugging** (F5) — this opens an Extension Development Host with glint diagnostics active for any `.gitlab-ci.yml` you open.
|
||||
|
||||
Make sure `glint` is on your `PATH`, or set `glint.executablePath` in VS Code settings to the full path of the binary.
|
||||
|
||||
To package a `.vsix` for local installation:
|
||||
|
||||
```bash
|
||||
task ext-package # produces glint-X.Y.Z.vsix
|
||||
code --install-extension glint-X.Y.Z.vsix
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
This project uses [Task](https://taskfile.dev) as a task runner.
|
||||
@@ -122,6 +144,9 @@ task ci # full check: vet → test → build → validate
|
||||
task fuzz # run fuzz tests for the YAML parser (Ctrl-C to stop; FUZZ_TIME=60s to set duration)
|
||||
task changelog # regenerate CHANGELOG.md from git history via git-cliff
|
||||
task changelog-next # preview unreleased section (dry-run, no file written)
|
||||
task ext-install # install VS Code extension npm dependencies
|
||||
task ext-compile # compile the VS Code extension TypeScript source
|
||||
task ext-package # package the VS Code extension as a .vsix
|
||||
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
|
||||
|
||||
+1
-1
@@ -98,7 +98,7 @@ The SVG renderer and terminal tree cover the basic layout. These would bring it
|
||||
- [x] **GitHub Actions action** — shipped v0.2.28; `action.yml` composite action downloads the glint Linux binary and runs `glint check`; mirror to GitHub as `k3nny/glint` to reference as `uses: k3nny/glint@v0.2.28`
|
||||
- [x] **Pre-commit hook** — shipped v0.2.28; `.pre-commit-hooks.yaml` defines `language: golang` hook; pre-commit builds glint from source on first run and re-runs on staged `.gitlab-ci.yml` changes
|
||||
- [x] **LSP server** — shipped v0.2.29; `glint lsp` runs a JSON-RPC 2.0 LSP server over stdin/stdout; `textDocument/didOpen`, `didChange`, `didSave`, `didClose` all publish diagnostics; rule IDs appear as the diagnostic `code`; include resolution is best-effort using env-var token and default cache dir
|
||||
- [ ] **VS Code extension** — thin wrapper around the LSP server with syntax highlighting for `.gitlab-ci.yml`
|
||||
- [x] **VS Code extension** — shipped v0.2.30; `editors/vscode/` TypeScript extension wraps `glint lsp` via `vscode-languageclient`; activates on YAML files and restricts LSP processing to `**/.gitlab-ci.yml`; configurable binary path via `glint.executablePath`; build with `task ext-compile`, package with `task ext-package`
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -192,6 +192,22 @@ tasks:
|
||||
desc: "Preview unreleased changelog entries without writing (requires git-cliff)"
|
||||
cmd: git cliff --config cliff.toml --unreleased
|
||||
|
||||
ext-install:
|
||||
desc: Install VS Code extension npm dependencies (run once after checkout)
|
||||
dir: editors/vscode
|
||||
cmd: npm install
|
||||
|
||||
ext-compile:
|
||||
desc: Compile the VS Code extension TypeScript source
|
||||
dir: editors/vscode
|
||||
cmd: npm run compile
|
||||
|
||||
ext-package:
|
||||
desc: Package the VS Code extension into a .vsix file
|
||||
dir: editors/vscode
|
||||
deps: [ext-compile]
|
||||
cmd: npm run package
|
||||
|
||||
clean:
|
||||
desc: Remove build artifacts
|
||||
cmd: rm -f {{.BINARY}} {{.BINARY}}-*.exe {{.BINARY}}-*-linux-amd64
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
node_modules/
|
||||
out/
|
||||
*.vsix
|
||||
@@ -0,0 +1,8 @@
|
||||
src/**
|
||||
tsconfig.json
|
||||
.gitignore
|
||||
node_modules/**
|
||||
!node_modules/vscode-languageclient/**
|
||||
!node_modules/vscode-languageserver-protocol/**
|
||||
!node_modules/vscode-languageserver-types/**
|
||||
!node_modules/vscode-jsonrpc/**
|
||||
Generated
+2532
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"name": "glint",
|
||||
"displayName": "glint — GitLab CI Linter",
|
||||
"description": "Inline diagnostics for .gitlab-ci.yml pipelines powered by the glint language server",
|
||||
"version": "0.2.29",
|
||||
"publisher": "k3nny",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.k3nny.fr/k3nny/glint"
|
||||
},
|
||||
"engines": {
|
||||
"vscode": "^1.82.0"
|
||||
},
|
||||
"categories": [
|
||||
"Linters"
|
||||
],
|
||||
"keywords": [
|
||||
"gitlab",
|
||||
"ci",
|
||||
"yaml",
|
||||
"lint",
|
||||
"pipeline"
|
||||
],
|
||||
"activationEvents": [
|
||||
"onLanguage:yaml"
|
||||
],
|
||||
"main": "./out/extension.js",
|
||||
"contributes": {
|
||||
"configuration": {
|
||||
"type": "object",
|
||||
"title": "glint",
|
||||
"properties": {
|
||||
"glint.executablePath": {
|
||||
"type": "string",
|
||||
"default": "glint",
|
||||
"markdownDescription": "Path to the `glint` binary. Leave as `glint` if it is on your `PATH`, or set an absolute path (e.g. `/usr/local/bin/glint`)."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"compile": "tsc -p ./",
|
||||
"watch": "tsc --watch -p ./",
|
||||
"package": "vsce package"
|
||||
},
|
||||
"dependencies": {
|
||||
"vscode-languageclient": "^9.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20",
|
||||
"@types/vscode": "^1.82.0",
|
||||
"@vscode/vsce": "^2.22.0",
|
||||
"typescript": "^5.3.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
import * as vscode from 'vscode';
|
||||
import {
|
||||
LanguageClient,
|
||||
LanguageClientOptions,
|
||||
ServerOptions,
|
||||
TransportKind,
|
||||
} from 'vscode-languageclient/node';
|
||||
|
||||
let client: LanguageClient | undefined;
|
||||
|
||||
export function activate(context: vscode.ExtensionContext): void {
|
||||
const cfg = vscode.workspace.getConfiguration('glint');
|
||||
const glintPath = cfg.get<string>('executablePath') || 'glint';
|
||||
|
||||
const serverOptions: ServerOptions = {
|
||||
command: glintPath,
|
||||
args: ['lsp'],
|
||||
transport: TransportKind.stdio,
|
||||
};
|
||||
|
||||
const clientOptions: LanguageClientOptions = {
|
||||
// Only process .gitlab-ci.yml files, not all YAML.
|
||||
documentSelector: [
|
||||
{ scheme: 'file', language: 'yaml', pattern: '**/.gitlab-ci.yml' },
|
||||
],
|
||||
};
|
||||
|
||||
client = new LanguageClient(
|
||||
'glint',
|
||||
'glint — GitLab CI Linter',
|
||||
serverOptions,
|
||||
clientOptions,
|
||||
);
|
||||
|
||||
client.start();
|
||||
context.subscriptions.push(client);
|
||||
}
|
||||
|
||||
export async function deactivate(): Promise<void> {
|
||||
await client?.stop();
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "ES2020",
|
||||
"lib": ["ES2020"],
|
||||
"outDir": "out",
|
||||
"rootDir": "src",
|
||||
"strict": true,
|
||||
"sourceMap": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "out"]
|
||||
}
|
||||
Reference in New Issue
Block a user