Skip to content

lspcheck 0.2.0

Choose a tag to compare

@github-actions github-actions released this 08 Nov 13:40
· 49 commits to main since this release
4712678

Added

  • Profiles: lspcheck --profile PATH reads a TOML file that gives a server what it needs and says what its
    maintainers accept (README, reference).
    • [server] sets the command (used when none follows --) and the timeouts; a flag on the command line still wins.
    • [workspace] copies a fixture directory and writes inline files into each scenario's workspace.
    • [client] sets initializationOptions and the settings that answer workspace/configuration (also sent in
      workspace/didChangeConfiguration after initialized).
    • [document] names the file K1 opens, its language_id, and up to five LINE:COLUMN positions.
    • [allow] lets named descendants outlive the server (L9) and skips checks with a reason.
    • A bad profile is a usage error (exit status 2) naming the key, before any server starts. Transcripts record the
      profile's files and settings, so replay recreates them.
  • Example profiles for gopls, rust-analyzer, lua-language-server and basedpyright.
  • K1 (MUST) sends each request the server advertises about an open document and fails if one is answered with
    MethodNotFound (-32601). A request still unanswered at the end of the session makes K1 inconclusive.
  • Robustness checks (POLICY), each in its own scenario:
    • R1 sends a well-framed body that isn't JSON and expects a null-id ParseError, or nothing, and continued service.
    • R2 sends wrongly typed parameters to an advertised request and expects an error response and continued service.
    • R3 opens a large document (--large-document-mib, 4 MiB by default) and expects continued service.
    • R4 checks that unusual but valid request ids (0, negative, the 32-bit extremes, empty, long and non-ASCII
      strings) come back exactly.
  • --junit PATH and --markdown PATH write CI reports alongside JSON: a JUnit XML report for CI test tabs and a
    summary table for a CI step summary (usage, format).

Changed

  • The JSON report has a top-level "profile" field (null without a profile); the schema id is unchanged.
  • With --transcripts, the terminal report also points to the transcripts directory for failures and errors of
    cross-cutting checks.
  • Dependency: toml 1.2 (features parse and serde), to read profiles.

Fixed

  • Transcripts keep each request before its reply, even when the reply is read while the request's write is still
    flushing, so replay no longer reports a recorded reply as missing (seen on Windows).