Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removes type-checking from empty-block rule #425

Merged
merged 1 commit into from
May 20, 2020

Conversation

chavacava
Copy link
Collaborator

Closes #416

Updated tests but as described in #424 we are currently incapable of testing on confidence level.
I've did some manual testing.

# set confidence = 1 in config, then
$ ./revive -config ./defaults.toml testdata/empty-block.go 
testdata/empty-block.go:13:2: this block is empty, you can remove it
testdata/empty-block.go:18:19: this block is empty, you can remove it
testdata/empty-block.go:26:9: this block is empty, you can remove it
testdata/empty-block.go:30:26: this block is empty, you can remove it
testdata/empty-block.go:34:6: this block is empty, you can remove it

# set confidence = 0.9 in config, then
$ ./revive -config ./defaults.toml testdata/empty-block.go 
testdata/empty-block.go:13:2: this block is empty, you can remove it
testdata/empty-block.go:18:19: this block is empty, you can remove it
testdata/empty-block.go:26:9: this block is empty, you can remove it
testdata/empty-block.go:30:26: this block is empty, you can remove it
testdata/empty-block.go:34:6: this block is empty, you can remove it
testdata/empty-block.go:40:2: this block is empty, you can remove it
testdata/empty-block.go:44:2: this block is empty, you can remove it

@chavacava chavacava requested a review from mgechev May 20, 2020 18:19
@mgechev mgechev merged commit e9bdc9e into mgechev:master May 20, 2020
@chavacava chavacava deleted the fix-416 branch May 25, 2020 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

panic: unable to type check
2 participants