Skip to content

Improvement/formatting setup #2041

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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

Saurabh2402
Copy link

@Saurabh2402 Saurabh2402 commented Jul 23, 2025

Changes Made

Step1 towards #2029

📄 New Configuration File

  • Added [.golangci.yml]:
    • Configured with formatters section including:
    • gofmt with simplify option enabled
    • gofumpt with extra rules and module path configuration
    • goimports for automatic import organization
    • Import statements reorganized across multiple Go modules following the formatting rules:
      • Standard library imports
      • Third-party dependencies
      • Local project imports

This is step 1 of implementing issue #2029, where I added the .golangci.yml configuration file

@Saurabh2402 Saurabh2402 marked this pull request as ready for review July 23, 2025 17:22
Copy link
Contributor

bismuthdev bot commented Jul 23, 2025

This PR is too large to scan.

@Saurabh2402
Copy link
Author

This PR is too large to scan.

You're absolutely right that this PR touches many files. However, since the changes are purely formatting-related (import organization and code style consistency), they shouldn't affect any functionality or cause test failures. The modifications are cosmetic in nature and maintain the same business logic throughout the codebase.

@Saurabh2402
Copy link
Author

Hello @motatoes,
This PR is ready for your review!

@motatoes
Copy link
Contributor

HI @Saurabh2402 thanks for this effort! However its very difficult for me to review this PR with so many lines changed. By the time I review it there would definitely be some merge conflicts in the repo, if you prefer you can have a PR with only the .golangci.yml changed and I can run the gofmt seperately so that that I can immediately merge it with no merge conflict, thanks!!

@Saurabh2402
Copy link
Author

Saurabh2402 commented Jul 24, 2025

Hi @motatoes ,

Thank you for the feedback! I completely understand your concern about the large diff making review difficult and potential merge conflicts.

I appreciate you offering to run the formatting separately, but I'd love to find a solution where we can still capture the contribution properly in the git history because I spent considerable time setting up the comprehensive .golangci.yml configuration, testing it across the entire codebase, and ensuring all the formatting was applied correctly without breaking anything 🙂.

Here are a couple of options that might work for both of us:

Option 1: Split into smaller PRs

  • PR 1: Just the .golangci.yml configuration (easy to review/merge)
  • PR 2: Format each folder specified in the go.work in separate PRs

Option 2: Live collaboration call

  • Would you be open to a quick 15-20 minute call where we can handle this together in real-time? We could:
  • Screen share and review the changes quickly together
  • I can walk you through what the formatting actually changed
  • Merge it immediately to avoid any conflict window
  • Much faster than async back-and-forth

I'm happy to go with whatever approach works best for you!
I just want to make sure the contribution gets properly attributed in the project history, as this formatting work will benefit all future contributors.

What do you think would work best?

Thanks again for maintaining this great project! 🙂

@motatoes
Copy link
Contributor

hey @Saurabh2402 I appreciate you but unfortunately that would be difficult. I'm keen to accept your contribution but to make this right for you I'm willing to accept the .golangci.yml file as a seperate file and I can run the formatting myself, let me know if it works for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants