New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
task: validate import alias via importas #2804
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6b0545c
task: validate import alias via importas
gssbzn 12651f0
Merge remote-tracking branch 'origin/master' into lint-importas
gssbzn beb7321
Merge remote-tracking branch 'origin/master' into lint-importas
gssbzn a60fabd
PR comments
gssbzn d0f0b25
Merge remote-tracking branch 'origin/master' into lint-importas
gssbzn d7a5abd
Merge remote-tracking branch 'origin/master' into lint-importas
gssbzn File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,45 @@ linters-settings: | |
min-occurrences: 2 | ||
gocyclo: | ||
min-complexity: 15 | ||
govet: | ||
check-shadowing: true | ||
maligned: | ||
suggest-new: true | ||
importas: | ||
no-extra-aliases: true | ||
alias: | ||
- pkg: go.mongodb.org/atlas-sdk/v[\d]+/admin | ||
alias: atlasv2 | ||
- pkg: go.mongodb.org/atlas/mongodbatlas | ||
alias: atlas | ||
- pkg: go.mongodb.org/atlas/auth | ||
alias: atlasauth | ||
- pkg: github.com/mongodb/mongodb-atlas-kubernetes/v2/pkg/api/v1 | ||
alias: akov2 | ||
- pkg: github.com/mongodb/mongodb-atlas-kubernetes/v2/pkg/api/v1/common | ||
alias: akov2common | ||
- pkg: github.com/mongodb/mongodb-atlas-kubernetes/v2/pkg/api/v1/provider | ||
alias: akov2provider | ||
- pkg: github.com/mongodb/mongodb-atlas-kubernetes/v2/pkg/api/v1/status | ||
alias: akov2status | ||
- pkg: github.com/mongodb/mongodb-atlas-kubernetes/v2/pkg/api/v1/project | ||
alias: akov2project | ||
- pkg: k8s.io/apimachinery/pkg/apis/meta/v1 | ||
alias: metav1 | ||
- pkg: k8s.io/api/apps/v1 | ||
alias: appsv1 | ||
- pkg: k8s.io/api/core/v1 | ||
alias: corev1 | ||
- pkg: k8s.io/api/rbac/v1 | ||
alias: rbacv1 | ||
- pkg: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 | ||
alias: apiextensionsv1 | ||
- pkg: k8s.io/apiserver/pkg/storage/names | ||
alias: k8snames | ||
- pkg: github.com/AlecAivazis/survey/v2/core | ||
alias: survey | ||
- pkg: github.com/creack/pty | ||
alias: pseudotty | ||
- pkg: cloud.google.com/go/kms/apiv1 | ||
alias: kmsv1 | ||
- pkg: github.com/mongodb/mongodb-atlas-cli/atlascli/internal/cli/config | ||
alias: cliconfig | ||
misspell: | ||
locale: US | ||
ignore-words: | ||
|
@@ -59,8 +94,6 @@ linters-settings: | |
sections: | ||
- standard | ||
- default | ||
section-separators: | ||
- newLine | ||
Comment on lines
-62
to
-63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. invalid config |
||
linters: | ||
disable-all: true | ||
enable: | ||
|
@@ -83,6 +116,7 @@ linters: | |
- gosimple # (megacheck) Linter for Go source code that specializes in simplifying code [fast: false, auto-fix: false] | ||
- govet # (vet, vetshadow) Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string [fast: false, auto-fix: false] | ||
- ineffassign # Detects when assignments to existing variables are not used [fast: true, auto-fix: false] | ||
- importas # Enforces consistent import aliases [fast: false, auto-fix: false] | ||
- makezero # Finds slice declarations with non-zero initial length [fast: false, auto-fix: false] | ||
- misspell # Finds commonly misspelled English words in comments [fast: true, auto-fix: true] | ||
- nakedret # Finds naked returns in functions greater than a specified function length [fast: true, auto-fix: false] | ||
|
@@ -138,7 +172,6 @@ linters: | |
# - gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations. [fast: true, auto-fix: false] | ||
# - grouper # An analyzer to analyze expression groups. [fast: true, auto-fix: false] | ||
# - ifshort # [deprecated] Checks that your code uses short syntax for if-statements whenever possible [fast: true, auto-fix: false] | ||
# - importas # Enforces consistent import aliases [fast: false, auto-fix: false] | ||
# - interfacebloat # A linter that checks the number of methods inside an interface. [fast: true, auto-fix: false] | ||
# - interfacer # [deprecated]: Linter that suggests narrower interface types [fast: false, auto-fix: false] | ||
# - ireturn # Accept Interfaces, Return Concrete Types [fast: false, auto-fix: false] | ||
|
@@ -174,8 +207,6 @@ run: | |
- e2e | ||
- unit | ||
- integration | ||
skip-dirs: | ||
- internal/mocks | ||
Comment on lines
-177
to
-178
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. invalid config |
||
modules-download-mode: readonly | ||
|
||
issues: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid configs