doc(...) selections
A scope term that selects document elements by CSS selector, the same way in every format. Headings are wrapped in nested section elements first, so a rule can name a section:
extends: occurrence
message: "An ADR has a Decision section."
level: error
scope: 'doc(section:has(> h2:contains("Decision")))'
token: '(?s).'
min: 1Alone, the selection is one block. Beside a scope, sentence & doc(...), it narrows that scope to the element. Negated, it excludes it. A metric rule with a scope now measures each block the scope names, so a section can have a word budget.
Docs: Selections, metric
TextFSM Views
A textfsm View reads plain text through a template in the form Google's TextFSM defined, run by Vale itself. What it captures becomes scopes placed at their line and column, so a rule can target a commit's subject or a transcript's turns. A conditional rule's new in key looks for second in another View scope, so a ! in a subject can require a BREAKING CHANGE: trailer.
Docs: TextFSM guide, conditional
Jupyter notebooks
.ipynb is a format: Markdown cells as Markdown, code cells as code in the kernel's language, outputs skipped. Alerts point into the notebook file itself.
Docs: Jupyter
Changelog
- ed71176 perf: index the walker's context instead of scanning it
- 252d096 perf: index rune positions and resume column counts per block
- 0dfd6e8 chore: accept configs and docstring in vocab
- 9dfbc90 docs: add GitBook badge
- 7285105 docs: README
- 5992ffc docs: update README
- d0ea8b4 feat: apply BlockIgnores and TokenIgnores to HTML
- b4e2aa7 fix: keep the source's space between a dash and inline markup (#1177)
- 4774ced fix: a sequence rule with a negated scope double-reports every match (#1169)
- 91af404 fix: make the CLA bot signable
- 0f8ed52 feat: lint Jupyter notebooks as a format of their own
- 4da60aa feat: join a selected list into one value, so a notebook cell is one block
- 683a2f6 feat: let a conditional look for its consequent in another View scope
- 4c0f64f fix: apply a dasel View to any file its section matches
- 1734e78 feat: give an unfilled textfsm value an empty scope, so min can report it
- abbf2ec test: read past Git's comment lines in the commit View
- 7ebd026 fix: name the file and both dasel causes when a View selector fails
- 8aab425 fix: let a raw pattern contain a percent sign
- 0c35215 fix: place a zero-width match, and report a rule error under a View
- 1e4f6ed fix: keep a package's StylesPath out of the path list, and let the project's rule settings win
- c18dcab ci: tell the docs about a release
- e0a2250 feat: validate actions at load, carry their suggestions, and let edit run a pipeline
- d039c95 feat: read plain text through TextFSM templates as a view engine
- cfddd62 feat: select document elements with doc(...) and measure any block
- 42c3ba6 fix: keep a line break after inline markup (#1174)