test: discovered vet issue, masked by tags

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2016-12-07 16:26:04 -05:00
parent 812981d95d
commit 05a295f267
Signed by: vbatts
GPG Key ID: 10937E57733F1362
2 changed files with 15 additions and 10 deletions

View File

@ -3,6 +3,7 @@ BUILD := gomtree
CWD := $(shell pwd)
SOURCE_FILES := $(shell find . -type f -name "*.go")
CLEAN_FILES := *~
TAGS := cvis
default: build validation
@ -18,24 +19,30 @@ CLEAN_FILES += .test .test.tags
go test -v ./... && touch $@
.test.tags: $(SOURCE_FILES)
go test -tags govis -v ./... && touch $@
for tag in $(TAGS) ; do go test -tags $$tag -v ./... ; done && touch $@
.PHONY: lint
lint: .lint
lint: .lint .lint.tags
CLEAN_FILES += .lint
CLEAN_FILES += .lint .lint.tags
.lint: $(SOURCE_FILES)
golint -set_exit_status ./... && touch $@
.PHONY: vet
vet: .vet
.lint.tags: $(SOURCE_FILES)
for tag in $(TAGS) ; do golint -set_exit_status -tags $$tag -v ./... ; done && touch $@
CLEAN_FILES += .vet
.PHONY: vet
vet: .vet .vet.tags
CLEAN_FILES += .vet .vet.tags
.vet: $(SOURCE_FILES)
go vet ./... && touch $@
.vet.tags: $(SOURCE_FILES)
for tag in $(TAGS) ; do go vet -tags $$tag -v ./... ; done && touch $@
.PHONY: cli.test
cli.test: .cli.test

View File

@ -206,12 +206,10 @@ func unvisRune(dst *[]byte, r rune, s *state, flags VisFlag) error {
}
*s = stateGround
return unvisValid
default:
*s = stateGround
return unvisErrSynbad
}
return nil
*s = stateGround
return unvisErrSynbad
}
type state int