Add -exclude flag and functionality #116

Merged
merged 1 commit into from Nov 18, 2016

Projects

None yet

2 participants

@kisielk
Owner
kisielk commented Nov 18, 2016

Fixes #112

@kisielk Add -exclude flag and functionality
719ac45
@@ -136,4 +137,6 @@ func main() {
b2.Write(nil)
rand.Read(nil)
mrand.Read(nil)
+
+ ioutil.ReadFile("main.go") // UNCHECKED
@dominikh
dominikh Nov 18, 2016 Collaborator

What does UNCHECKED mean/what is this line testing? I don't see any change that actually makes the tests use a non-empty list of excludes.

@kisielk
kisielk Nov 18, 2016 Owner

I was using it for manual testing. Will need to do some work on the test code to actually have a test case for the exclude functions.

@kisielk
kisielk Nov 18, 2016 Owner

But basically the idea is to have an exclude file with ioutil.ReadFile in it and then this line should not be flagged as an unchecked error. I just need to figure out a good way to tell the test case that.

@dominikh
dominikh Nov 18, 2016 Collaborator

SGTM. PR LGTM.

@kisielk kisielk merged commit db0ca22 into master Nov 18, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@tamird tamird added a commit to tamird/cockroach that referenced this pull request Nov 18, 2016
@tamird tamird GLOCKFILE: update dependencies
Replaces `TestUnused` with a folding of `unused` into our
`pkg/cmd/metacheck`.

Summary of not-definitely-irrelevant changes:
- github.com/kisielk/errcheck:
	- Ignore irrelevant errors from stdlib: kisielk/errcheck#115
	- Add -exclude flag: kisielk/errcheck#116

Skipped:
- github.com/cockroachdb/c-jemalloc
- github.com/cockroachdb/c-rocksdb (#9616)
- github.com/docker/docker (docker/docker#27912) breaks all dependents
- google.golang.org/grpc (#9697)
d8dc19f
@tamird tamird added a commit to tamird/cockroach that referenced this pull request Nov 18, 2016
@tamird tamird GLOCKFILE: update dependencies
Replaces `TestUnused` with a folding of `unused` into our
`pkg/cmd/metacheck`.

Summary of not-definitely-irrelevant changes:
- github.com/kisielk/errcheck:
	- Ignore irrelevant errors from stdlib: kisielk/errcheck#115
	- Add -exclude flag: kisielk/errcheck#116

Skipped:
- github.com/cockroachdb/c-jemalloc
- github.com/cockroachdb/c-rocksdb (#9616)
- github.com/docker/docker (docker/docker#27912 breaks all dependents)
- google.golang.org/grpc (#9697)
c624a95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment