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

var-- should count as assignment #57

Closed
troyronda opened this issue Nov 5, 2019 · 5 comments
Closed

var-- should count as assignment #57

troyronda opened this issue Nov 5, 2019 · 5 comments
Assignees
Labels
bug Something isn't working golangci-only Fixed in wsl but not merged to golangci-lint

Comments

@troyronda
Copy link

golangci-lint v1.21


rec.WaitCount--		 	
if rec.WaitCount == 0 {		 	
    return &delivering{}, nil		 			
}

resulted in a linter warning.

However an if statement following an assignment should be allowed.

@bombsimon bombsimon added bug Something isn't working enhancement New feature or request labels Nov 6, 2019
@bombsimon bombsimon self-assigned this Nov 6, 2019
@bombsimon
Copy link
Owner

bombsimon commented Nov 6, 2019

@troyronda Thanks for the report!

This is fixed in 5f129ac on master but not yet released in WSL or merged to golangci-lint!

I was hoping to get some work done with the fixer in #4 before the next PR to golangci-lint but I guess that might be a bit optimistic and since there are more fixes in wsl not yet merged to golangci-lint I might have to create a PR before the fixer is in place.

@bombsimon
Copy link
Owner

bombsimon commented Nov 6, 2019

I've released v1.2.6 in WSL in the meantime so if it's really urgent it's possible to build golangci-lint manually.

@troyronda
Copy link
Author

@bombsimon Excellent. Thanks for the update!

@bombsimon bombsimon removed the enhancement New feature or request label Nov 10, 2019
@bombsimon
Copy link
Owner

PR in golangci-lint to get this fix merged.

@bombsimon bombsimon added the golangci-only Fixed in wsl but not merged to golangci-lint label Nov 10, 2019
@bombsimon
Copy link
Owner

Merged to master i golangci-lint, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working golangci-only Fixed in wsl but not merged to golangci-lint
Projects
None yet
Development

No branches or pull requests

2 participants