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

chore: enable additional linters #118

Merged
merged 5 commits into from
Jul 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ linters:
disable-all: true
enable:
- deadcode
- errcheck
- errorlint
- goconst
- gocyclo
Expand All @@ -16,12 +17,15 @@ linters:
- ineffassign
- misspell
- nakedret
- nilerr
- prealloc
- revive
- staticcheck
- structcheck
- typecheck
- unconvert
- unused
- varcheck
- whitespace
# Run with --fast=false for more extensive checks
fast: true
2 changes: 1 addition & 1 deletion cmd/proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (p *proxy) writeResponse(w http.ResponseWriter, res *http.Response) {
// Set a special header to notify that the proxy actually serviced the request.
w.Header().Set("Server", "pi-sidecar-proxy")
w.WriteHeader(res.StatusCode)
io.Copy(w, res.Body)
_, _ = io.Copy(w, res.Body)
res.Body.Close()

klog.InfoS("request complete", "status", res.StatusCode)
Expand Down
1 change: 0 additions & 1 deletion cmd/webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ func init() {
}

func main() {

// TODO (aramase) once webhook is added as an arc extension, use extension
// util to check if running in arc cluster.
flag.BoolVar(&arcCluster, "arc-cluster", false, "Running on arc cluster")
Expand Down