lang, lang: types: Add automatic stringer generation

It's more useful if we know the string representation of Kind's.
This commit is contained in:
James Shubin
2019-04-27 16:14:10 -04:00
parent 310239e707
commit 2f7e202f40
7 changed files with 39 additions and 5 deletions

View File

@@ -27,7 +27,7 @@ if [ "$COMMITS" != "" ] && [ "$COMMITS" -gt "1" ]; then
fi
# find all go files, exluding temporary directories and generated files
LINT=$(find * -maxdepth 9 -iname '*.go' -not -path 'old/*' -not -path 'tmp/*' -not -path 'bindata/*' -not -path 'lang/y.go' -not -path 'lang/lexer.nn.go' -not -path 'vendor/*' -exec golint {} \;) # current golint output
LINT=$(find * -maxdepth 9 -iname '*.go' -not -path 'old/*' -not -path 'tmp/*' -not -path 'bindata/*' -not -path 'lang/y.go' -not -path 'lang/lexer.nn.go' -not -path 'lang/types/kind_stringer.go' -not -path 'vendor/*' -exec golint {} \;) # current golint output
COUNT=`echo -e "$LINT" | wc -l` # number of golint problems in current branch
[ "$LINT" = "" ] && echo PASS && exit # everything is "perfect"

View File

@@ -48,6 +48,7 @@ gml="$gml --enable=misspell"
gml="$gml --exclude=lang/lexer.nn.go"
gml="$gml --exclude=lang/y.go"
gml="$gml --exclude=bindata/bindata.go"
gml="$gml --exclude=lang/types/kind_stringer.go"
gometalinter="$gml" # final
echo "Using: $gometalinter"