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

Enable stricter linting with golangci-lint #316

Merged
merged 8 commits into from
Nov 22, 2021
Merged

Enable stricter linting with golangci-lint #316

merged 8 commits into from
Nov 22, 2021

Conversation

tsmethurst
Copy link
Contributor

This PR enables stricter linting by adding a golangci configuration file, and enabling the following linters in addition to the default golangci-lint ones:

- contextcheck
- forcetypeassert
- goconst
- gocritic
- gofmt
- gosec
- ifshort
- nilerr
- revive
- wastedassign

The function of these linters can be seen here: https://golangci-lint.run/usage/linters/

The purpose of this is to make sure that contributed code is consistent with the existing style of Go as used in GtS.

The PR also fixes some security + clarity issues flagged by the new linting.

@tsmethurst tsmethurst merged commit f863034 into main Nov 22, 2021
@tsmethurst tsmethurst deleted the strict_linting branch November 22, 2021 07:46
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