Skip to content

Conversation

@jjngx
Copy link
Contributor

@jjngx jjngx commented Sep 27, 2022

Proposed changes

This PR fixes linting issues in the k8s and nginx packages reported by staticcheck (errors and double imports)

$ staticcheck internal/k8s/*.go
internal/k8s/controller.go:3563:13: error strings should not be capitalized (ST1005)
internal/k8s/controller_test.go:21:2: package "k8s.io/api/core/v1" is being imported more than once (ST1019)
        internal/k8s/controller_test.go:22:2: other import of "k8s.io/api/core/v1"
internal/k8s/handlers.go:542:17: error strings should not be capitalized (ST1005)
...
internal/k8s/status.go:12:2: package "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1" is being imported more than once (ST1019)
        internal/k8s/status.go:13:2: other import of "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1"
...
internal/k8s/task_queue.go:176:19: error strings should not be capitalized (ST1005)

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@jjngx jjngx requested review from a team, ciarams87, lucacome and shaun-nx September 27, 2022 14:17
@github-actions github-actions bot added the chore Pull requests for routine tasks label Sep 27, 2022
@jjngx jjngx requested a review from haywoodsh September 27, 2022 14:19
@jjngx jjngx changed the title Fix staticcheck linter issues in k8s package Fix staticcheck linter issues in k8s, nginx packages Sep 27, 2022
@jjngx jjngx requested a review from a team September 27, 2022 19:23
@codecov-commenter
Copy link

codecov-commenter commented Sep 28, 2022

Codecov Report

Merging #3107 (325074a) into main (d24bd22) will decrease coverage by 0.08%.
The diff coverage is 14.28%.

❗ Current head 325074a differs from pull request most recent head 0c81f0a. Consider uploading reports for the commit 0c81f0a to get more accurate results

@@            Coverage Diff             @@
##             main    #3107      +/-   ##
==========================================
- Coverage   52.49%   52.41%   -0.09%     
==========================================
  Files          58       58              
  Lines       16033    15997      -36     
==========================================
- Hits         8417     8385      -32     
+ Misses       7338     7336       -2     
+ Partials      278      276       -2     
Impacted Files Coverage Δ
internal/k8s/task_queue.go 0.00% <0.00%> (ø)
internal/nginx/manager.go 0.00% <0.00%> (ø)
internal/nginx/utils.go 0.00% <0.00%> (ø)
internal/k8s/controller.go 11.00% <14.28%> (ø)
internal/k8s/status.go 33.27% <20.00%> (ø)
internal/k8s/handlers.go 6.83% <100.00%> (ø)
internal/k8s/validation.go 93.31% <0.00%> (-0.50%) ⬇️
internal/k8s/configuration.go 95.76% <0.00%> (+0.36%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jjngx jjngx merged commit 2bd2646 into main Sep 29, 2022
@jjngx jjngx deleted the chore/staticcheck-lint branch September 29, 2022 09:44
coolbry95 pushed a commit to coolbry95/kubernetes-ingress that referenced this pull request Nov 18, 2022
* Fix staticcheck linter issues in k8s package

* Fix linter issues in nginx package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Pull requests for routine tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants