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

Add revive linter and enable superfluous-else rule #1448

Merged

Conversation

RebeccaMahany
Copy link
Contributor

@RebeccaMahany RebeccaMahany commented Nov 8, 2023

Adds https://github.com/mgechev/revive -- https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#superfluous-else

Example error message:

% golangci-lint run      
cmd/launcher/main.go:78:11: superfluous-else: if block ends with call to panic function, so drop this else and outdent its block (revive)
			} else {
				level.Debug(logger).Log("msg", "Nothing new")
			}

zackattack01
zackattack01 previously approved these changes Nov 8, 2023
Copy link
Contributor

@zackattack01 zackattack01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 🚀

@RebeccaMahany RebeccaMahany added this pull request to the merge queue Nov 8, 2023
Merged via the queue into kolide:main with commit a2ba4c4 Nov 8, 2023
26 checks passed
@RebeccaMahany RebeccaMahany deleted the becca/superfluous-else-lint branch November 8, 2023 23:07
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.

4 participants