-
Notifications
You must be signed in to change notification settings - Fork 347
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
ci: add golangci-lint, yamlllint and codespell #79
Conversation
fe354ec
to
dae2e0e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great, nice work @lianghao208!
@lianghao208 thanks again for the PR. When you have a moment, can you update the PR base on the feedback? |
@danehans I've already update the PR 2 days ago, and there seems to be some details haven't been confirmed yet. ping @arkodg |
@lianghao208 raised #90 to make a call on how we install tooling |
e2dbe1d
to
e1684cd
Compare
In #90 (comment), we reached a consensus. Let's keep the |
xref #63 |
@lianghao208 #102 is now in, which should unblock this PR |
tools/codespell/Dockerfile.builder
Outdated
@@ -0,0 +1,8 @@ | |||
# python | |||
FROM python:3.7-slim as python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you will need to install codespell
and yamllint
in tools/Dockerfile.builder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arkodg
Sorry for my miscomprehension, I thought the linters need to run as docker-in-docker(cause the tools/Dockerfile.builder
only provides golang base image and has docker installed)
If we install codespell and yamllint in tools/Dockerfile.builder, does it mean we need a ubuntu base image instead of golang? (python is required for yamllint and codespell)
FROM golang:1.18.2 as builder > FROM ubuntu:focal as builder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refer to Istio: https://github.com/istio/tools/blob/master/docker/build-tools/Dockerfile
I made some changes.
da6e849
to
4d072de
Compare
@arkodg ps: I think each linter runs on separate containers saves much more time than running on single tools/Dockerfile.builder to set up environment step by step. But since istio and envoy are using this method, I guess this is a widely accepted approach. |
@lizan thoughts regarding #79 (comment)? |
74c2000
to
5fa4c7c
Compare
Signed-off-by: lianghao208 <roylizard3@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #79 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 5 5
=========================================
Hits 5 5 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for working through the review comments !
Signed-off-by: lianghao208 roylizard3@gmail.com
issue: #73