1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-21 16:05:40 +00:00

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