Skip to content

fix: add gofmt to golangci-lint in Makefile and .github/workflows/ci-build.yaml#13729

Merged
crenshaw-dev merged 3 commits intoargoproj:masterfrom
Calchan:gofmt
Jul 5, 2023
Merged

fix: add gofmt to golangci-lint in Makefile and .github/workflows/ci-build.yaml#13729
crenshaw-dev merged 3 commits intoargoproj:masterfrom
Calchan:gofmt

Conversation

@Calchan
Copy link
Contributor

@Calchan Calchan commented May 24, 2023

Out of curiosity I ran gofmt at the top of the repo and it found quite a few formatting issues and simplifications. This PR adds gofmt to golangci-lint in Makefile and .github/workflows/ci-build.yaml to automatically detect/fix these issues in the future. It also applies the relevant changes provided by running gofmt.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.

@Calchan Calchan marked this pull request as draft May 24, 2023 16:52
@codecov
Copy link

codecov bot commented May 24, 2023

Codecov Report

Patch coverage: 83.33% and no project coverage change.

Comparison is base (d7632df) 49.76% compared to head (124f80b) 49.76%.

❗ Current head 124f80b differs from pull request most recent head a0c02eb. Consider uploading reports for the commit a0c02eb to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #13729   +/-   ##
=======================================
  Coverage   49.76%   49.76%           
=======================================
  Files         261      261           
  Lines       44676    44676           
=======================================
  Hits        22232    22232           
  Misses      20257    20257           
  Partials     2187     2187           
Impacted Files Coverage Δ
server/badge/badge.go 83.50% <ø> (ø)
server/logout/logout.go 79.16% <ø> (ø)
util/db/certificate.go 76.83% <ø> (ø)
util/db/helmrepository.go 0.00% <0.00%> (ø)
util/io/files/util.go 57.57% <ø> (ø)
util/settings/resources_filter.go 100.00% <ø> (ø)
applicationset/generators/list.go 61.11% <100.00%> (ø)
util/argo/argo.go 66.45% <100.00%> (ø)
util/db/repository_legacy.go 46.77% <100.00%> (ø)
util/helm/client.go 50.65% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Calchan Calchan marked this pull request as ready for review May 24, 2023 18:04
@Calchan Calchan changed the title fix: add gofmt to lint-local in Makefile fix: add gofmt to golangci-lint in Makefile and .github/workflows/ci-build.yaml May 26, 2023
@blakepettersson blakepettersson added the ready-for-review An approver should give a final review and merge the PR label May 28, 2023
Copy link
Member

@blakepettersson blakepettersson left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Calchan Calchan force-pushed the gofmt branch 3 times, most recently from 186c00a to 0f2c72e Compare May 31, 2023 15:26
@Calchan Calchan force-pushed the gofmt branch 2 times, most recently from 526b7e0 to 40488aa Compare June 6, 2023 15:10
@crenshaw-dev
Copy link
Member

I'm gonna save this until after we cut 2.8-rc1. Wanna avoid anything that will reduce PR velocity until then.

@crenshaw-dev crenshaw-dev self-assigned this Jun 21, 2023
@Calchan
Copy link
Contributor Author

Calchan commented Jun 21, 2023

I'm gonna save this until after we cut 2.8-rc1. Wanna avoid anything that will reduce PR velocity until then.

No worries. Let me know when you do it and I'll rebase just before that.

@Calchan
Copy link
Contributor Author

Calchan commented Jul 3, 2023

@crenshaw-dev I have manually rebased this in case you want to merge it since v2.8.0-rc1 has been released.

Calchan added 3 commits July 5, 2023 09:12
…build.yaml

Signed-off-by: Denis Dupeyron <denis.dupeyron@gmail.com>
Signed-off-by: Denis Dupeyron <denis.dupeyron@gmail.com>
Signed-off-by: Denis Dupeyron <denis.dupeyron@gmail.com>
@crenshaw-dev crenshaw-dev merged commit 4a50a31 into argoproj:master Jul 5, 2023
yyzxw pushed a commit to yyzxw/argo-cd that referenced this pull request Aug 9, 2023
…i-build.yaml (argoproj#13729)

* fix: add gofmt to golangci-lint in Makefile and .github/workflows/ci-build.yaml

Signed-off-by: Denis Dupeyron <denis.dupeyron@gmail.com>

* fix go formatting issues using gofmt

Signed-off-by: Denis Dupeyron <denis.dupeyron@gmail.com>

* chore: simplify go code using gofmt

Signed-off-by: Denis Dupeyron <denis.dupeyron@gmail.com>

---------

Signed-off-by: Denis Dupeyron <denis.dupeyron@gmail.com>
@suzaku suzaku mentioned this pull request Aug 15, 2023
tesla59 pushed a commit to tesla59/argo-cd that referenced this pull request Dec 16, 2023
…i-build.yaml (argoproj#13729)

* fix: add gofmt to golangci-lint in Makefile and .github/workflows/ci-build.yaml

Signed-off-by: Denis Dupeyron <denis.dupeyron@gmail.com>

* fix go formatting issues using gofmt

Signed-off-by: Denis Dupeyron <denis.dupeyron@gmail.com>

* chore: simplify go code using gofmt

Signed-off-by: Denis Dupeyron <denis.dupeyron@gmail.com>

---------

Signed-off-by: Denis Dupeyron <denis.dupeyron@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review An approver should give a final review and merge the PR

Projects

Archived in project
Status: Completed

Development

Successfully merging this pull request may close these issues.

4 participants