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

Fix some linter issues #26

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mjtrangoni
Copy link

Hi @metehanozturk @cemkucuk ,

I fixed here some trivial linter issues reported by gosimple, gocritic, and goimports.

mjtrangoni added 3 commits May 1, 2020 16:05
See,
$ golangci-lint run --disable-all -E gosimple ./...
main/main.go:82:2: S1000: should use a simple channel send/receive instead of `select` with a single case (gosimple)
	select {
	^

Signed-off-by: Mario Trangoni <[email protected]>
See,
$ golangci-lint run --disable-all -E gocritic ./...
runbook/executor_test.go:88:2: ifElseChain: rewrite if-else to switch statement (gocritic)
	if runtime.GOOS == "darwin" {
	^
conf/configuration.go:197:6: sloppyLen: len(confFilepath) <= 0 can be len(confFilepath) == 0 (gocritic)
		if len(confFilepath) <= 0 {
		   ^
conf/configuration_test.go:110:5: sloppyLen: len(owner) <= 0 can be len(owner) == 0 (gocritic)
	if len(owner) <= 0 {
	   ^
conf/configuration_test.go:114:5: sloppyLen: len(repo) <= 0 can be len(repo) == 0 (gocritic)
	if len(repo) <= 0 {
	   ^
conf/configuration_test.go:118:5: sloppyLen: len(filepath) <= 0 can be len(filepath) == 0 (gocritic)
	if len(filepath) <= 0 {
	   ^
conf/configuration_test.go:122:5: sloppyLen: len(token) <= 0 can be len(token) == 0 (gocritic)
	if len(token) <= 0 {
	   ^

Signed-off-by: Mario Trangoni <[email protected]>
See,
$ golangci-lint run --disable-all -E goimports ./...

Signed-off-by: Mario Trangoni <[email protected]>
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.

1 participant