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

[chore] lint fixes #1599

Merged
merged 11 commits into from
Jul 28, 2021
Merged

[chore] lint fixes #1599

merged 11 commits into from
Jul 28, 2021

Conversation

shaneutt
Copy link
Contributor

What this PR does / why we need it:

Enables lint checks on the hack/ and internal/ directories and cleans up all found linter issues.

Also the gci linter is disabled because it's problematic, but a target for running goimports is added which will help keep the imports consistent.

Which issue this PR fixes

Fixes #1597

@shaneutt shaneutt added priority/low area/ci area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. labels Jul 28, 2021
@shaneutt shaneutt self-assigned this Jul 28, 2021
@shaneutt shaneutt requested a review from a team as a code owner July 28, 2021 21:40
@shaneutt shaneutt linked an issue Jul 28, 2021 that may be closed by this pull request
2 tasks
@rainest
Copy link
Contributor

rainest commented Jul 28, 2021

#1589 introduced conflicts, whoops.

Do we in fact want to include hack/? That seems like it should be skipped for the most part since it's mostly not-Go aside from the templates, and the templates we should catch issues in the generated code without the template markup (including internal/ means we do check the output). Apparently it doesn't complain about anything currently, but it still seems wrong.

While we're here, it looks like we can strip pkg/client (it no longer exists). Do we want to include pkg/clientset?

@shaneutt
Copy link
Contributor Author

#1589 introduced conflicts, whoops.

I fixed in 1decdda

Do we in fact want to include hack/? That seems like it should be skipped for the most part since it's mostly not-Go aside from the templates, and the templates we should catch issues in the generated code without the template markup (including internal/ means we do check the output). Apparently it doesn't complain about anything currently, but it still seems wrong.

Anywhere there is go code, we should lint it

While we're here, it looks like we can strip pkg/client (it no longer exists). Do we want to include pkg/clientset?

Sounds good 9f9cf7f

@Kong Kong deleted a comment from codecov bot Jul 28, 2021
@codecov
Copy link

codecov bot commented Jul 28, 2021

Codecov Report

Merging #1599 (e972a14) into next (10c0b42) will decrease coverage by 0.04%.
The diff coverage is 24.24%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #1599      +/-   ##
==========================================
- Coverage   46.19%   46.15%   -0.05%     
==========================================
  Files          71       71              
  Lines        6736     6745       +9     
==========================================
+ Hits         3112     3113       +1     
- Misses       3256     3261       +5     
- Partials      368      371       +3     
Flag Coverage Δ
integration-test 46.15% <24.24%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/cmd/rootcmd/rootcmd.go 28.57% <ø> (ø)
...trollers/configuration/zz_generated_controllers.go 32.59% <ø> (ø)
internal/ctrlutils/utils.go 93.75% <ø> (-2.09%) ⬇️
internal/deckgen/generate.go 50.61% <ø> (ø)
internal/diagnostics/server.go 64.00% <0.00%> (-3.57%) ⬇️
internal/kongstate/kongstate.go 37.55% <0.00%> (ø)
internal/kongstate/types.go 75.00% <0.00%> (-8.34%) ⬇️
internal/parser/ingressrules.go 66.66% <ø> (+7.14%) ⬆️
internal/proxy/clientgo_cached_proxy_resolver.go 60.26% <0.00%> (ø)
internal/sendconfig/sendconfig.go 53.78% <ø> (ø)
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 10c0b42...e972a14. Read the comment docs.

@rainest rainest merged commit bc19341 into next Jul 28, 2021
@rainest rainest deleted the lint-fixes branch July 28, 2021 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. ci/license/unchanged priority/low
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lint Fixes for 2.0
2 participants