Using Vale

Crossplane relies on Vale to enforce the style guide.

Crossplane’s Vale style definitions are in the utils/vale directory.

Install Vale

Follow the directions on the Vale website to install the Vale binary.

Crossplane CI uses Vale v2.22.0 or later.

Run Vale

Run Vale on all documentation from the command-line with

1vale --config="utils/vale/.vale.ini"` content/

To run Vale on a single file use

1vale --config="utils/vale/.vale.ini"` content/contribute/
VSCode has a Vale plugin. VSCode runs the Vale checks when saving a markdown file.

Vale styles

Crossplane uses the following Vale styles:

Ignore Vale rules

Vale can turn off specific rules or all rules inside a doc.

All ignored rules must include a justification for why they’re ignored.

After the ignored content turn the rules back on.

Vale ignores rules not turned back on for the rest of the document.

Ignore all rules

Use <!-- vale off --> to ignore all Vale rules and <!-- vale on --> to turn Vale back on.

For example,

1<!-- vale off -->
2<!-- turn off vale checking for this example -->
3The following example will use passive voice and lowercase crossplane. Do not do this.
4<!-- vale on -->

Ignore specific rules

Ignore a specific rule with <!-- vale <rule name> = NO --> and turn the rule back on with <!-- vale <rule name> = YES -->.

Do not turn off rules without good reasons.

For example,

1<!-- vale Microsoft.Contractions = NO -->
2<!-- turn off contractions for the example -->
3Do not turn off rules without good reasons.
4<!-- vale Microsoft.Contractions = YES -->
Vale requires capitalization for YES and NO and a space around =.