Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
house-lee committed Jun 14, 2024
1 parent a34b46c commit da4564a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ now = $(shell date -u)
fpm = @docker run --platform linux/amd64 --rm -i -v "$(CURDIR):$(CURDIR)" -w "$(CURDIR)" -u $(shell id -u) digitalocean/fpm:latest
shellcheck = @docker run --platform linux/amd64 --rm -i -v "$(CURDIR):$(CURDIR)" -w "$(CURDIR)" -u $(shell id -u) koalaman/shellcheck:v0.6.0
version_check = @./scripts/check_version.sh
linter = docker run --platform linux/amd64 --rm -i -v "$(CURDIR):$(CURDIR)" -w "$(CURDIR)" -e "GOOS=$(GOOS)" -e "GOARCH=$(GOARCH)" -e "GO111MODULE=on" -e "GOFLAGS=-mod=vendor" -e "XDG_CACHE_HOME=$(CURDIR)/target/.cache/go" \
-u $(shell id -u) golangci/golangci-lint:v1.54 \
linter = docker run --platform linux/amd64 --rm -i -v "$(CURDIR):$(CURDIR)" -w "$(CURDIR)" -e "GOOS=$(GOOS)" -e "GOARCH=$(GOARCH)" -e "GO111MODULE=on" -e "GOFLAGS=-mod=vendor -buildvcs=false" -e "XDG_CACHE_HOME=$(CURDIR)/target/.cache/go" \
-u $(shell id -u) golangci/golangci-lint:v1.58 \
golangci-lint run --skip-files=.*_test.go -D errcheck -E revive -E gosec -E gofmt

go_docker_linux = golang:1.21.1
go_docker_linux = golang:1.22.3
ifeq ($(GOOS), linux)
go = docker run --platform linux/amd64 --rm -i \
-e "GOOS=$(GOOS)" \
Expand Down
4 changes: 2 additions & 2 deletions cmd/agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"context"
"encoding/json"
"net/http"
_ "net/http/pprof"
_ "net/http/pprof" // #nosec G108
"os"
"os/signal"
"syscall"
Expand All @@ -30,7 +30,7 @@ func main() {
if cfg.DebugMode {
log.EnableDebug()
go func() {
http.ListenAndServe(config.AppDebugAddr, nil)
http.ListenAndServe(config.AppDebugAddr, nil) // #nosec G114
}()
log.Info("Debug mode enabled")
}
Expand Down
2 changes: 1 addition & 1 deletion internal/metadata/watcher/web_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (w *webBasedWatcher) Run() error {
}

r := http.NewServeMux()
r.HandleFunc("/new_metadata", func(rw http.ResponseWriter, r *http.Request) {
r.HandleFunc("/new_metadata", func(rw http.ResponseWriter, _ *http.Request) {
if !w.limiter.Allow() {
rw.WriteHeader(http.StatusTooManyRequests)
return
Expand Down

0 comments on commit da4564a

Please sign in to comment.