gunk-dev/the-valley

verification-project.cue

source221b93eb65bfmain's published tip history
1.4 KiB
1// The project layer of a sample verification policy: what one project in
2// the group says about itself, on top of the instance floor. It is a
3// sample, not an installed file — the real one lives in the project's own
4// repository, because everything above the floor travels with the project
5// (ida-3e87f5c).
6//
7// Validate, composed with the instance layer:
8// cue vet -c schema/verification.cue \
9// examples/verification-instance.cue examples/verification-project.cue
10package verification
11
12// The project type this project starts from. On its own this line is a
13// complete policy: it picks up the floor and the docs template's knowledge
14// lint, and nothing below is required to make it valid.
15type: "docs"
16
17project: {
18 // A check the floor and the template know nothing about. A project may
19 // always add classes and checks; the open struct is what allows it.
20 checks: "shellcheck": {
21 runner: "nix"
22 attribute: "shellcheck"
23 }
24 classes: scripts: {
25 paths: "bin/**": true
26 requires: "shellcheck": true
27 }
28
29 // The template offered the knowledge lint as a default, so this
30 // project can decline it and vet still passes. Declining the floor's
31 // prose-format the same way does not: writing
32 // `classes: prose: requires: "prose-format": false` here conflicts with
33 // the floor's concrete `true` and fails vet naming the field. That is
34 // the difference the two forms of the value encode.
35 classes: knowledge: requires: "knowledge-lint": false
36}