run gofmt in CI

This commit is contained in:
Jesse Portnoy
2023-07-19 18:27:35 +01:00
parent d20dc58bbf
commit 390702b097
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -25,4 +25,7 @@ jobs:
run: cd examples && go mod tidy && go build syncat.go
- name: Test
run: go test -v
run: |
FMT_ISSUES=$(gofmt -l .)
if test -n "$FMT_ISSUES" ;then printf "gofmt found problems:\n$FMT_ISSUES\n";exit 11; fi
go test -v
+1 -1
View File
@@ -9,7 +9,7 @@ import (
func getDefs(t *testing.T, filename string, data []byte, highlight_lexer string) *Def {
var def *Def
syn_dir := "./syntax_files"
syn_dir := "./syntax_files"
var defs []*Def
lerr, warnings := ParseSyntaxFiles(syn_dir, &defs)