Skip to content
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

add more linters to golangci-linters #1424

Merged
merged 4 commits into from Mar 1, 2022
Merged

add more linters to golangci-linters #1424

merged 4 commits into from Mar 1, 2022

Conversation

bwagner5
Copy link
Contributor

@bwagner5 bwagner5 commented Feb 27, 2022

1. Issue, if available:
N/A

2. Description of changes:

  • Fix golangci-linters config - indentation was incorrect on the linters-settings block
  • Add misspell, govet, gofmt, goimports, and gocyclo to the golangci-linter config, and remove duplicated checks in the Makefile.
  • Removed the hardcoded aws build tag
  • Removed named returns where govet picked up shadowed var on err

3. How was this change tested?
make verify

4. Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: link to issue
  • No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@netlify
Copy link

netlify bot commented Feb 27, 2022

✔️ Deploy Preview for karpenter-docs-prod canceled.

🔨 Explore the source changes: 47d4470

🔍 Inspect the deploy log: https://app.netlify.com/sites/karpenter-docs-prod/deploys/621e6e815f9a08000701cedc

@@ -4,9 +4,6 @@ run:

timeout: 5m

build-tags:
- aws
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean we're no longer checking the AWS code paths?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the linters don't use build tags. I did a test to confirm by adding a bunch of if's which gocyclo picked up. Also checked goimports corrects code inside of the aws cloud provider.

@ellistarn ellistarn merged commit 5e8dc24 into aws:main Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants