Add test case resource validation

Open
#202 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript, vscode

Research direction

Read the earlier implementation on the local feature/resourse-validation branch and compare it with current code, then review the commands in cql-language-server 5.1.0. Trace the extension’s test case handling, CQL Explorer, config editor, and schema entry points. Done means the requested validation flows and opt-in settings work, the bundled language server is bumped, and docs and changelog are updated.

Written by the indexing model from the issue text.

Description

enhancement

Add test case resource validation to the extension, using the commands shipped in cql-language-server 5.1.0 (cqframework/cql-language-server#160).

Scope

  • Validate command (cql.test-case.validate): validates a test case file, folder, or all test cases of the active library. Results appear as diagnostics in the Problems panel at the offending file and line.
  • CQL Explorer: validate a single test case or all test cases of a library from the tree, with an error/warning/pass icon and tooltip counts on each test case.
  • Validate on save: opt-in, debounced per test case folder. Ignores results/ and shared/.
  • Before-execute check: opt-in off / warn / block for Execute CQL and the debugger.
  • Optional FHIR profile validation (QUICK / FULL) with background prewarm. While the engine builds, results include custom checks only and the user is told to re-run.
  • Config: a validation section in input/tests/config.jsonc, editable in the config editor, and added to schemas/cql-config.schema.json.
  • Bump the bundled language server to 5.1.0.
  • Docs and changelog.

Notes

An earlier implementation exists on a local branch (feature/resourse-validation) and is being re-applied onto current code. It was held back until the language server release existed.

Related: #114 (warning for test cases with bad references).

Dominant language
TypeScript
Stars
14
Forks
8
Avg merge
1d 22h
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cqframework/vscode-cql

All issues in cqframework/vscode-cql

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.