-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore(formatting): fix infected files with correct formatting #5099
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
Changes from 2 commits
3838513
971c685
eaa6ff0
2b5cfe7
a0f898e
a499801
5e28708
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,13 @@ jobs: | |
| with: | ||
| go-version-file: go.mod | ||
|
|
||
| # https://github.com/golangci/golangci-lint-action?tab=readme-ov-file#verify | ||
|
Collaborator
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. Wdyt about adding
Member
Author
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. Changed. First impression was, that it does not support both operation, but looks like it does. Validated here https://github.com/golangci/golangci-lint-action/blob/3b4f037d0e94e85d98f9824ef87b2dc32d53fbd5/src/run.ts#L140 |
||
| - name: Verify linter configuration | ||
| uses: golangci/golangci-lint-action@v6 | ||
| with: | ||
| verify: true | ||
| version: v1.63 | ||
|
|
||
| - name: Lint go code | ||
| uses: golangci/golangci-lint-action@v6 | ||
| with: | ||
|
|
||
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.
Current
indent_sizeon all go files in master is 2.Why would we want to change it to 4 ? It would force to update all codebase and force all PRs to rebase.
side note: there are no gitmodules in this project
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.
Removed submodules.
I've added
gofmt -l -s -w .togo-lintdocs https://pkg.go.dev/cmd/gofmtI only found this few files that

have issues with intendations, rest of them are fine
Uh oh!
There was an error while loading. Please reload this page.
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.
Shell we add
gofmtvalidation to github actions?Uh oh!
There was an error while loading. Please reload this page.
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.
Some inspirations from kubernetes-sigs https://github.com/search?q=org%3Akubernetes-sigs+gofmt&type=code&p=3
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.
Golang is 4 tabs intendation, which is set across the project.
Is it shows 2 spaces in your editor?
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.
When I checked yesterday, it was displaying 2 spaces.
Today, it display 4 spaces, as you say 😅 .
Yes, it sounds good 👍 .
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.
Gofmt github action step in action https://github.com/kubernetes-sigs/external-dns/actions/runs/13366428004/job/37325125200?pr=5099
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.
Nice !