Skip to content

Commit bb8215a

Browse files
committed
fix: update Makefile to use #SecurityInsights schema
Currently the `lintyml` step is a no-op, because it doesn't explicitly validate against the #SecurityInsights schema. Fix that by specifying that vet should validate non-CUE files agains that schema. This now aligns the `cue vet` checks here with the si-tooling usage of the #SecurityInsights Go generated code: https://github.com/ossf/si-tooling/blob/88ed8ab93e3fe1f4aab9ccabb5452942e0325a53/v2/si/security_insights.go#L67 Also use `cue vet` to validate the schema itself. This is the more canonical way to validate a schema. Signed-off-by: Paul Jolly <[email protected]>
1 parent 8c1c399 commit bb8215a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
lintcue:
22
@echo " > Linting CUE schema ..."
3-
@cue eval schema.cue --all-errors --verbose
3+
@cue vet . --all-errors --verbose
44

55
lintyml:
66
@echo " > Linting YAML files ..."
77
@echo " > Linting .github/security-insights.yml ..."
8-
@cue vet .github/security-insights.yml schema.cue
8+
@cue vet -d '#SecurityInsights' . .github/security-insights.yml
99
@echo " > Linting template-full.yml ..."
10-
cue vet template-full.yml schema.cue
10+
cue vet -d '#SecurityInsights' . template-full.yml
1111
@echo " > Linting template-minimum.yml ..."
12-
cue vet template-minimum.yml schema.cue
12+
cue vet -d '#SecurityInsights' . template-minimum.yml
1313
@echo " > Linting template-multi-repository-project-reuse.yml ..."
14-
cue vet template-multi-repository-project-reuse.yml schema.cue
14+
cue vet -d '#SecurityInsights' . template-multi-repository-project-reuse.yml
1515
@echo " > Linting template-multi-repository-project.yml ..."
16-
cue vet template-multi-repository-project.yml schema.cue
16+
cue vet -d '#SecurityInsights' . template-multi-repository-project.yml
1717

1818
cuegen:
1919
@echo " > Generating types from cue schema ..."
2020
@cue exp gengotypes schema.cue
2121
@echo " > vet the generated go types ..."
2222
@go vet cue_types_gen.go
2323

24-
PHONY: lintcue lintyml cuegen
24+
PHONY: lintcue lintyml cuegen

0 commit comments

Comments
 (0)