Skip to content

Commit

Permalink
golangci-lint: enable dot-imports rule of revive
Browse files Browse the repository at this point in the history
Discouraging dot-imports is a good rule. We can enable it again now with
an exception for the Ginkgo and Gomega packages. Importing those two
packages with dot-import makes test files more readable.

Signed-off-by: Raghavendra Talur <[email protected]>
  • Loading branch information
raghavendra-talur committed Nov 21, 2023
1 parent 96b2cbe commit 682326b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ linters-settings:
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
# - name: dot-imports
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
Expand Down Expand Up @@ -79,6 +79,15 @@ linters-settings:
# - name: confusing-results
# - name: bool-literal-in-expr

issues:
exclude-rules:
# Allow dot imports for ginkgo and gomega
- source: ginkgo|gomega
linters:
- revive
text: "should not use dot imports"


linters:
disable-all: true
enable:
Expand Down

0 comments on commit 682326b

Please sign in to comment.