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

Enable gofumpt linter #6093

Merged
merged 3 commits into from
Jan 16, 2024

Conversation

sunjayBhatia
Copy link
Member

A stricter form of gofmt, added rules can be found here: https://github.com/mvdan/gofumpt?tab=readme-ov-file#added-rules

@sunjayBhatia sunjayBhatia added the release-note/none-required Marks a PR as not requiring a release note. Should only be used for very small changes. label Jan 16, 2024
@sunjayBhatia sunjayBhatia requested a review from a team as a code owner January 16, 2024 17:50
@sunjayBhatia sunjayBhatia requested review from tsaarni, skriss, a team and clayton-gonsalves and removed request for a team January 16, 2024 17:50
A stricter form of gofmt, added rules can be found here: https://github.com/mvdan/gofumpt?tab=readme-ov-file#added-rules

Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
@sunjayBhatia sunjayBhatia force-pushed the enable-gofumpt-linter branch from 979ce75 to bb29b1b Compare January 16, 2024 17:53
@sunjayBhatia
Copy link
Member Author

can run gofumpt -l -w -extra . to repro the changes

Copy link

codecov bot commented Jan 16, 2024

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (02faa3a) 78.81% compared to head (c3a710b) 78.85%.
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6093      +/-   ##
==========================================
+ Coverage   78.81%   78.85%   +0.03%     
==========================================
  Files         138      138              
  Lines       19778    19731      -47     
==========================================
- Hits        15589    15558      -31     
+ Misses       3886     3870      -16     
  Partials      303      303              
Files Coverage Δ
cmd/contour/certgen.go 50.72% <ø> (ø)
cmd/contour/contour.go 0.00% <ø> (ø)
cmd/contour/shutdownmanager.go 42.93% <ø> (+0.71%) ⬆️
internal/annotation/annotations.go 100.00% <100.00%> (ø)
internal/certgen/certgen.go 74.45% <100.00%> (ø)
internal/certgen/output.go 48.48% <100.00%> (-1.52%) ⬇️
internal/contour/metrics.go 71.21% <100.00%> (ø)
internal/controller/grpcroute.go 26.66% <ø> (+0.86%) ⬆️
internal/controller/httproute.go 26.66% <ø> (+0.86%) ⬆️
internal/controller/tcproute.go 0.00% <ø> (ø)
... and 41 more

@skriss
Copy link
Member

skriss commented Jan 16, 2024

The changes all look reasonable to me. It'd be nice to add a make task to use gofumpt to auto-format everything and maybe mention it in CONTRIBUTING.md

Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
Copy link
Member

@skriss skriss left a comment

Choose a reason for hiding this comment

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

👍

@sunjayBhatia sunjayBhatia merged commit 572515a into projectcontour:main Jan 16, 2024
25 of 26 checks passed
@sunjayBhatia sunjayBhatia deleted the enable-gofumpt-linter branch January 16, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/none-required Marks a PR as not requiring a release note. Should only be used for very small changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants