• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DrRataplan / xq-lsp / 43222980498
94%

Build:
DEFAULT BRANCH: main
Ran 12 Nov 2026 01:00PM UTC
Jobs 1
Files 42
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Nov 2026 12:59PM UTC coverage: 94.854% (+0.6%) from 94.295%
43222980498

push

github

web-flow
feat: add 'xq-lsp lint' CLI for standalone linting (#190)

* feat: add 'xq-lsp lint' CLI for standalone linting

Add an eslint-style command-line linter as a subcommand of the existing
xq-lsp binary (no new global bin name). It lints files, directories, and
globs, discovers the nearest lsp-config.xq per file exactly like the
editor, and reports the same diagnostics: errors (syntax, undeclared
variables/prefixes, type errors), warnings (unresolved imports, opt-in
strict cardinality), and hints (unused symbols, redundant xmlns), which
never affect the exit code.

Exit codes mirror eslint: 0 clean, 1 errors (or warnings over
--max-warnings), 2 fatal. Output defaults to eslint's stylish format,
with json and compact formatters, --quiet, --no-color, and
--config/--help/--version flags.

The cross-file machinery (config discovery, glob indexes, import
resolution, and the full diagnostic pipeline) is extracted from
server.ts into a shared Workspace (src/workspace.ts) so the CLI and the
LSP server report identical diagnostics. The bin entry now points at a
small dispatcher (src/main.ts): 'lint' runs the CLI, anything else
starts the language server as before (the package 'main' stays
dist/server.js, so editor integrations are unaffected).

* test: cover the lint CLI and extracted workspace module

The first push of the lint CLI dropped project coverage below main's
(Coveralls: -0.4%): the new modules were only exercised through spawned
subprocesses, and the extracted workspace.ts carried server-only paths
that no test drove. Add direct unit tests:

- workspace.test.ts: analyzeDocument/analyzeDocumentFull caching,
  loadAnalysisForUri (disk, open-document, missing), getGlobFileAccess
  (config/no-config, loadAst cache hit/miss), getGlobAnalyses (namespace
  index, same-namespace merge, per-config-dir cache, unreadable glob
  files), resolveContext (at-path imports, glob fallback, missing
  at-path fallback, sibling modules, existdb predeclared namespaces),
  a... (continued)

2675 of 3014 branches covered (88.75%)

Branch coverage included in aggregate %.

835 of 839 new or added lines in 6 files covered. (99.52%)

8403 of 8665 relevant lines covered (96.98%)

815228.25 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
97.83
src/cli.ts
2
84.62
src/main.ts
Jobs
ID Job ID Ran Files Coverage
1 43222980498.1 12 Nov 2026 01:00PM UTC 42
94.85
GitHub Action Run
Source Files on build 43222980498
  • Tree
  • List 42
  • Changed 22
  • Source Changed 1
  • Coverage Changed 22
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #43222980498
  • 1e49b0f0 on github
  • Prev Build on main (#40284603818)
  • Next Build on main (#43223088761)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc