Skip to content

feat: add Check, Vet, Format Check tasks and a welcome walkthrough - #562

Closed
metif12 wants to merge 2 commits into
vlang:masterfrom
metif12:feat/check-vet-fmt-tasks
Closed

metif12 wants to merge 2 commits into
vlang:masterfrom
metif12:feat/check-vet-fmt-tasks

Conversation

@metif12

@metif12 metif12 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

What this adds

Two things from the same part of the roadmap: the three gates that were
unreachable, and the onboarding that did not exist.

Check, vet, and format

  • V: Check runs v -check, which type-checks without producing a binary
  • V: Vet runs v vet -W, which reports suspicious constructs and treats
    warnings as errors — the one to use in CI
  • V: Format Check runs v fmt -verify, which reports whether the formatter
    would change anything

None of these was reachable from the extension. The v-workflow skill documents
v -check and v fmt -verify as the two that gate everything else, so a user
following the skill's advice had to leave the editor to follow it.

Each works on the active file when one is open, and on the workspace otherwise,
matching how Run and Test already behave. All three surface through the vls
problem matcher, so a failure lands in the Problems panel at the right line rather
than only in the task output.

The flags were verified against the compiler before writing the args:

command clean file file with a problem
v -check file.v exit 0 exit 1
v vet -W file.v exit 0 exit 1 on warnings
v fmt -verify file.v exit 0 exit 1 when not formatted

Welcome walkthrough

There was no onboarding. Tasks, CodeLens, coverage and the agent commands were
only discoverable from the README, so a user who did not read it had no way to
learn that V: Check or the coverage status item existed.

The walkthrough has three steps, each completing when the command it describes has
been run: install V, build/run/test, and check/vet/format. That walks a new user
through the extension's own commands rather than asking them to read
documentation first.

The agents step is deliberately absent. It would describe v mcp and v skills, which are not on this branch, and a walkthrough step for a command that
does not exist is worse than no step. It can be added when #558 and #559 merge.

Verification

npm run lint, npm run lint:md, npm run test:grammar, npm run build and
npm run package all pass.

npm test reports 24 tests, 21 pass, 3 fail. The three failures are the
pre-existing Windows path-separator tests on master, fixed in
#561 and not touched here.
This branch is based on master rather than #556, so it carries none of those
fixes; the three failures are the same three, unchanged.

Proof the new tests catch something, each reverted:

  1. replaced the v.mod probe in standaloneTaskScope with if (false) →
    uses the nearest V project root for standalone saves and coverage red
  2. removed the v.vls.openOutput entry from contributes.commands →
    declares every registered command red, naming the id
  3. removed markdownDeprecationMessage from vls.args →
    declares every legacy setting red, naming the key
  4. pointed a walkthrough step at a missing file →
    ships a walkthrough whose steps point at files that exist red, naming the step

My first attempt at (3) used a regex that silently matched nothing and the test
stayed green. I redid it through the parsed object, which is the version reported
above — a sabotage that does not apply proves nothing about the test.

Relation to other PRs

Independent of #556, #557, #558, #559 and #560. It touches taskSpec.ts,
vTasks.ts, package.json, README.md, CHANGELOG.md and walkthrough/, none
of which the other PRs modify in a conflicting way.

@metif12 metif12 changed the title feat: add Check, Vet and Format Check tasks feat: add Check, Vet, Format Check tasks and a welcome walkthrough Oct 6, 2026
@metif12
metif12 force-pushed the feat/check-vet-fmt-tasks branch 2 times, most recently from ef48079 to 0412839 Compare October 7, 2026 18:17
office and others added 2 commits October 9, 2026 22:18
`v -check`, `v vet -W` and `v fmt -verify` are the three gates the rest of a
change hangs on. The v-workflow skill documents them as the two that gate
everything else, and none of them was reachable from the extension — a user had
to find a terminal.

Each works on the active file when one is open, and on the workspace otherwise,
matching how Run and Test already behave. All three surface through the `vls`
problem matcher, so a failure lands in the Problems panel at the right line
rather than only in the task output.

The flags were verified against the compiler rather than assumed:

| command | clean | problem |
|---|---|---|
| `v -check file.v` | exit 0 | exit 1 |
| `v vet -W file.v` | exit 0 | exit 1 on warnings |
| `v fmt -verify file.v` | exit 0 | exit 1 when not formatted |

`v vet -W` is the one to use in CI, since it treats warnings as errors.

The task enum grows to six actions, and every enum entry now has a description —
a bare word in a task picker gives a user no idea what it runs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was no onboarding. Tasks, CodeLens, coverage and the agent commands were
only discoverable from the README, so a user who did not read it had no way to
learn that `V: Check` or the coverage status item existed.

The walkthrough has three steps, each completing when the command it describes has
been run:

1. install V
2. build, run and test
3. check, vet and format

That means the walkthrough walks a new user through the extension's own commands
rather than asking them to read documentation first, and it is also the natural
home for the agent features when those land.

The agents step is deliberately absent. It would describe `v mcp` and `v
skills`, which are not on this branch, and a walkthrough step for a command that
does not exist is worse than no step. It can be added when vlang#558 and vlang#559 merge.

A test checks the walkthrough rather than trusting it: every step must have a
title, a description and a media file that exists in the repository, and every
completion event must name a declared command. I confirmed it catches something by
pointing a step at a missing file and watching it fail, then reverting.
@metif12
metif12 force-pushed the feat/check-vet-fmt-tasks branch from 0412839 to a9c005a Compare October 9, 2026 18:52
@metif12

metif12 commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #583, which is this branch's tree plus three files.

Both are based on 55cec96. git diff origin/feat/check-vet-fmt-tasks origin/feat/walkthrough-debug is exactly three files: package.json (+10/-1,
the walkthrough description text and the new debugging step), src/taskSpec.ts
(+3/-1, a prettier reformat of taskActionTitle) and walkthrough/debugging.md
(+18, new). This branch's own file set is a strict subset of #583's, and no content
here is absent from #583.

@metif12 metif12 closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant