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 golangci lint GH action #2976

Merged
merged 10 commits into from
Oct 22, 2020
14 changes: 14 additions & 0 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: golangci-lint
Glyphack marked this conversation as resolved.
Show resolved Hide resolved
on:
pull_request:
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.29
Copy link
Member

Choose a reason for hiding this comment

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

Any way we can keep the versions in sync with the Makefile? (https://github.com/projectcontour/contour/blob/main/hack/golangci-lint#L15)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did not quite understand what you mean. Do you mean is there any way to sync these two versions or syncing it now from v1.29 to v.1.31.0?

Copy link
Contributor

Choose a reason for hiding this comment

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

I can't think of a great way to have only a single place with the version. We might just have to live with it in multiple places like we do with the Go version :(

Copy link
Member

Choose a reason for hiding this comment

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

There's a version in the hacks/golanglint-ci script as well as now in this GH Action PR. So we need to be diligent in keeping the two in in sync. This is the benefit of just leaving the Makefile doing the work and not having a separate action.

only-new-issues: true
4 changes: 4 additions & 0 deletions internal/contour/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,7 @@ func (e *EventHandler) rebuildDAG() {
}

}

func unUsedFunc() interface{} {
return nil
}