1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-22 00:15:39 +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) CWD := $(shell pwd)
SOURCE_FILES := $(shell find . -type f -name "*.go") SOURCE_FILES := $(shell find . -type f -name "*.go")
CLEAN_FILES := *~ CLEAN_FILES := *~
TAGS := cvis
default: build validation default: build validation
@ -18,24 +19,30 @@ CLEAN_FILES += .test .test.tags
go test -v ./... && touch $@ go test -v ./... && touch $@
.test.tags: $(SOURCE_FILES) .test.tags: $(SOURCE_FILES)
go test -tags govis -v ./... && touch $@ for tag in $(TAGS) ; do go test -tags $$tag -v ./... ; done && touch $@
.PHONY: lint .PHONY: lint
lint: .lint lint: .lint .lint.tags
CLEAN_FILES += .lint CLEAN_FILES += .lint .lint.tags
.lint: $(SOURCE_FILES) .lint: $(SOURCE_FILES)
golint -set_exit_status ./... && touch $@ golint -set_exit_status ./... && touch $@
.PHONY: vet .lint.tags: $(SOURCE_FILES)
vet: .vet 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) .vet: $(SOURCE_FILES)
go vet ./... && touch $@ go vet ./... && touch $@
.vet.tags: $(SOURCE_FILES)
for tag in $(TAGS) ; do go vet -tags $$tag -v ./... ; done && touch $@
.PHONY: cli.test .PHONY: cli.test
cli.test: .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 *s = stateGround
return unvisValid return unvisValid
default:
*s = stateGround
return unvisErrSynbad
} }
return nil *s = stateGround
return unvisErrSynbad
} }
type state int type state int