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 linting to CI #25

Merged
merged 4 commits into from
Jun 17, 2021
Merged

Add linting to CI #25

merged 4 commits into from
Jun 17, 2021

Conversation

Avokadoen
Copy link
Contributor

@Avokadoen Avokadoen commented Jun 17, 2021

This commit adds linting to the CI. It also makes linting and testing of the code run in parallel
The build job will wait and only run if both the linting and testing succeeds.

Currently we use the default linters enabled by the golangci-lint tool:

  • deadcode
  • errcheck
  • gosimple
  • govet
  • ineffassign
  • staticcheck
  • structcheck
  • typecheck
  • unused
  • varcheck

The tool should run all of the previously mentioned in parallel too, so the overhead of this should be relatively minor

@Avokadoen Avokadoen linked an issue Jun 17, 2021 that may be closed by this pull request
This commit adds linting to the CI. It also makes linting and testing og the code run in parallel
The build job will wait and only run if both the linting and testing succeeds.

Currently we use the default linters enabled by the golangci-lint tool:
* deadcode
* errcheck
* gosimple
* govet
* ineffassign
* staticcheck
* structcheck
* typecheck
* unused
* varcheck

The tool should run all of the previously mentioned in parallel too, so the overhead of this should be relatively minor
@Avokadoen Avokadoen changed the title .#23: add linting to CI add linting to CI Jun 17, 2021
@Avokadoen Avokadoen changed the title add linting to CI Add linting to CI Jun 17, 2021
@Avokadoen Avokadoen marked this pull request as draft June 17, 2021 10:32
@Avokadoen
Copy link
Contributor Author

TODO: Add optional githooks

@Avokadoen
Copy link
Contributor Author

Avokadoen commented Jun 17, 2021

PR stays as a draft until linting is happy. Keep in mind golangci-lint support turning of linting of untouched files, but personally I think it's better to nip linting problems asap

There were some linter complaints cause by introducing new linting
to the project. Old undetected issues are now resolved.
@Avokadoen Avokadoen force-pushed the linting branch 2 times, most recently from 7a92d16 to 4fa66c6 Compare June 17, 2021 16:21
@Avokadoen Avokadoen marked this pull request as ready for review June 17, 2021 16:22
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.

Feature: more linting in CI
2 participants