Skip to content

check: run a single rule over the project to measure a new branch #379

Description

@thecodedrift

#362 asks for a voice-rule workflow step: measure a new branch over the repository's own prose before it ships at warning, and record the false-positive count beside the branch. Writing that passage into create-vale-rule turned up that there is no single command for the measurement.

check takes --dir, --json, --anonymous, --dangerously-run-scripts and --timeout (packages/cli/src/commands/check.ts), plus positional paths. There is no --rule <id> or equivalent filter, so a whole-project run always executes every rule in .taskless/rules/. test <path> does isolate one rule, but it runs only that rule's fixtures, never the project.

The workaround the recipe now documents is a whole-project check --json filtered afterwards:

taskless check --json | jq '[.results[] | select(.ruleId == "<id>")] | length'

It works, but it runs every engine and every rule to answer a question about one, and on the dogfood repository (~1,100 markdown files, eleven voice rules) that is the slow path on every iteration of a branch. A per-branch count also needs the author to run the rule with that branch as its only raw entry, since a finding carries no record of which alternative matched.

What to do

  • check --rule <id> (repeatable), restricting the run to the named rule(s). For Vale that is the isolating config test already assembles for one rule, pointed at the project walk instead of the fixture tree.
  • Keep the exclusions a whole-project run applies (.taskless/, git-ignored paths, converter-dependent formats) so the count matches what check would report.
  • Update the corpus-count passage in create-vale-rule to name the flag once it ships.

Refs #362

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIRelated to the taskless CLI

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions