diff --git a/Makefile b/Makefile index 106191826a..de4771c88f 100644 --- a/Makefile +++ b/Makefile @@ -77,7 +77,7 @@ include tools/make/*.mk ALLOY_IMAGE ?= grafana/alloy:latest ALLOY_BINARY ?= build/alloy SERVICE_BINARY ?= build/alloy-service -AGENTLINT_BINARY ?= build/agentlint +ALLOYLINT_BINARY ?= build/alloylint GOOS ?= $(shell go env GOOS) GOARCH ?= $(shell go env GOARCH) GOARM ?= $(shell go env GOARM) @@ -126,9 +126,9 @@ endif # .PHONY: lint -lint: agentlint +lint: alloylint find . -name go.mod -execdir golangci-lint run -v --timeout=10m \; - $(AGENTLINT_BINARY) ./... + $(ALLOYLINT_BINARY) ./... .PHONY: test # We have to run test twice: once for all packages with -race and then once @@ -169,11 +169,11 @@ else $(GO_ENV) go build $(GO_FLAGS) -o $(SERVICE_BINARY) ./cmd/alloy-service endif -agentlint: +alloylint: ifeq ($(USE_CONTAINER),1) $(RERUN_IN_CONTAINER) else - cd ./internal/cmd/agentlint && $(GO_ENV) go build $(GO_FLAGS) -o ../../../$(AGENTLINT_BINARY) . + cd ./internal/cmd/alloylint && $(GO_ENV) go build $(GO_FLAGS) -o ../../../$(ALLOYLINT_BINARY) . endif # diff --git a/internal/cmd/agentlint/go.mod b/internal/cmd/agentlint/go.mod deleted file mode 100644 index 31cf906db8..0000000000 --- a/internal/cmd/agentlint/go.mod +++ /dev/null @@ -1,7 +0,0 @@ -module github.com/grafana/alloy/internal/cmd/agentlint - -go 1.21 - -require golang.org/x/tools v0.17.0 - -require golang.org/x/mod v0.14.0 // indirect diff --git a/internal/cmd/agentlint/go.sum b/internal/cmd/agentlint/go.sum deleted file mode 100644 index 84d5fdb7e0..0000000000 --- a/internal/cmd/agentlint/go.sum +++ /dev/null @@ -1,6 +0,0 @@ -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= -golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= diff --git a/internal/cmd/agentlint/internal/findcomponents/findcomponents.go b/internal/cmd/alloylint/internal/findcomponents/findcomponents.go similarity index 100% rename from internal/cmd/agentlint/internal/findcomponents/findcomponents.go rename to internal/cmd/alloylint/internal/findcomponents/findcomponents.go diff --git a/internal/cmd/agentlint/internal/syntaxtags/syntaxtags.go b/internal/cmd/alloylint/internal/syntaxtags/syntaxtags.go similarity index 100% rename from internal/cmd/agentlint/internal/syntaxtags/syntaxtags.go rename to internal/cmd/alloylint/internal/syntaxtags/syntaxtags.go diff --git a/internal/cmd/agentlint/main.go b/internal/cmd/alloylint/main.go similarity index 51% rename from internal/cmd/agentlint/main.go rename to internal/cmd/alloylint/main.go index 30ebbbaff9..9ac7c80a99 100644 --- a/internal/cmd/agentlint/main.go +++ b/internal/cmd/alloylint/main.go @@ -1,10 +1,10 @@ -// Command agentlint provides custom linting utilities for the grafana/alloy +// Command alloylint provides custom linting utilities for the grafana/alloy // repo. package main import ( - "github.com/grafana/alloy/internal/cmd/agentlint/internal/findcomponents" - "github.com/grafana/alloy/internal/cmd/agentlint/internal/syntaxtags" + "github.com/grafana/alloy/internal/cmd/alloylint/internal/findcomponents" + "github.com/grafana/alloy/internal/cmd/alloylint/internal/syntaxtags" "golang.org/x/tools/go/analysis/multichecker" )