Skip to content

Commit

Permalink
Disable dot-imports in revive golang ci lint linter
Browse files Browse the repository at this point in the history
The linter is picking up dot imports in test files which are a valid
use-case. Until it is corrected, the dot-import rule has been disabled.

Signed-off-by: Chris Doherty <[email protected]>
  • Loading branch information
chrisdoherty4 committed Jan 17, 2024
1 parent 31dc349 commit 0c9b5c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ linters-settings:
- name: range-val-in-closure
- name: range-val-address
- name: dot-imports
disabled: true # Disable until dot-import is allowed in test files.
- name: error-naming
- name: error-return
- name: error-strings
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ help:

# -- Tooling

GOLANGCI_LINT_VERSION ?= v1.51.2
GOLANGCI_LINT_VERSION ?= v1.55.2
GOLANGCI_LINT := $(TOOLS_DIR)/golangci-lint
$(GOLANGCI_LINT):
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | \
Expand Down Expand Up @@ -74,7 +74,7 @@ tools: $(GOLANGCI_LINT) $(MOCKGEN) $(SETUP_ENVTEST) $(HADOLINT) $(YAMLLINT_BIN)

.PHONY: clean-tools
clean-tools: ## Remove tools installed for development.
chmod -R +w $(TOOLS_DIR)/envtest
@chmod -R +w $(TOOLS_DIR)/envtest &> /dev/null || true
rm -rf $(TOOLS_DIR)

# -- Everything else
Expand Down Expand Up @@ -115,7 +115,7 @@ setup-envtest: $(SETUP_ENVTEST)

# Integration tests are located next to unit test. This recipe will search the code base for
# files including the "//go:build integration" build tag and build them into the test binary.
# For packages containing both unit and integration tests its recommended to populate
# For packages containing both unit and integration tests its recommended to populate
# "//go:build !integration" in all unit test sources so as to avoid compiling them in this recipe.
.PHONY: test-integration
test-integration: ## Run integration tests.
Expand All @@ -134,7 +134,7 @@ image: build
DOCKER_BUILDKIT=1 docker build $(IMAGE_ARGS) .

mocks: ## Generate mocks for testing.
mocks: $(MOCKGEN)
mocks: $(MOCKGEN)
$(MOCKGEN) \
-destination internal/frontend/ec2/frontend_mock_test.go \
-package ec2 \
Expand Down

0 comments on commit 0c9b5c5

Please sign in to comment.