Skip to content

Commit

Permalink
[chore] use only gci linter
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <[email protected]>
  • Loading branch information
mmorel-35 committed Dec 7, 2024
1 parent 464969b commit 26f5f1f
Show file tree
Hide file tree
Showing 66 changed files with 185 additions and 236 deletions.
6 changes: 0 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ linters-settings:
- pattern: interface{}
replacement: any

goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
local-prefixes: github.com/open-telemetry/opentelemetry-collector-contrib

misspell:
# Correct spellings using locale preferences for US or UK.
# Default is to use a neutral variety of English.
Expand Down Expand Up @@ -151,7 +146,6 @@ linters:
- gci
- gocritic
- gofumpt
- goimports
- gosec
- govet
- misspell
Expand Down
16 changes: 9 additions & 7 deletions Makefile.Common
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ MISSPELL_CORRECTION := $(TOOLS_BIN_DIR)/misspell -w
LINT := $(TOOLS_BIN_DIR)/golangci-lint
MULTIMOD := $(TOOLS_BIN_DIR)/multimod
CHLOGGEN := $(TOOLS_BIN_DIR)/chloggen
GOIMPORTS := $(TOOLS_BIN_DIR)/goimports
PORTO := $(TOOLS_BIN_DIR)/porto
CHECKFILE := $(TOOLS_BIN_DIR)/checkfile
CROSSLINK := $(TOOLS_BIN_DIR)/crosslink
Expand Down Expand Up @@ -208,9 +207,7 @@ checklinks:
$(MDLINKCHECK) -q -c $(SRC_ROOT)/.github/workflows/check_links_config.json || true

.PHONY: fmt
fmt: $(GOFUMPT) $(GOIMPORTS)
$(GOFUMPT) -l -w .
$(GOIMPORTS) -w -local github.com/open-telemetry/opentelemetry-collector-contrib ./
fmt: gofumpt gci

.PHONY: lint
lint: $(LINT) checklicense misspell
Expand Down Expand Up @@ -245,13 +242,18 @@ moddownload:
.PHONY: testifylint
testifylint: $(TESTIFYLINT)
@echo "running $(TESTIFYLINT)"
$(TESTIFYLINT) $(TESTIFYLINT_OPT) ./...
@$(TESTIFYLINT) $(TESTIFYLINT_OPT) ./...

.PHONY: testifylint-fix
testifylint-fix:
@$(MAKE) testifylint TESTIFYLINT_OPT="${TESTIFYLINT_OPT} --fix"

.PHONY: gofumpt
gofumpt: $(GOFUMPT)
@echo "running $(GOFUMPT)"
@$(GOFUMPT) -l -w .

.PHONY: gci
gci: $(TOOLS_BIN_DIR)/gci
gci: $(GCI)
@echo "running $(GCI)"
@$(GCI) write -s standard -s default -s "prefix(github.com/open-telemetry/opentelemetry-collector-contrib)" $(ALL_SRC_AND_DOC)
@$(GCI) write -s standard -s default -s "prefix(github.com/open-telemetry/opentelemetry-collector-contrib)" .

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions exporter/lokiexporter/generated_component_telemetry_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 26f5f1f

Please sign in to comment.