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

Go Code format checker and formatter #182

Merged

Conversation

faraazbrcm
Copy link
Contributor

@faraazbrcm faraazbrcm commented Jan 16, 2024

Also formatted the files which dont adhere to go formats. Build will fail if there exists any formatting issue.
Formatting is supported for bookworm as well.

Why I did it

This was done to make the code readable and organised as per Golang standards

How I did it

I execute gofmt tool as part of build step and fail the build in case of formatting issues

How to verify it

build has to go through. no manual verification is required.

@adyeung
Copy link

adyeung commented Jan 18, 2024

@kwangsuk @ganglyu please help review

gnmi_server/clear_neighbor_dummy_test.go Show resolved Hide resolved
gnmi_server/clear_neighbor_dummy_test.go Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@faraazbrcm faraazbrcm force-pushed the code_formatting branch 3 times, most recently from e61ae37 to 0c7cf59 Compare January 19, 2024 06:33
@slicking
Copy link

@faraazbrcm thank you for putting up this PR, do you have the time to move it forward and submit? We think the formatting cleanup and build check would be very helpful to have.

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Also formatted the files which dont adhere to go formats. Build will
fail if there exists any formatting issue.
Formatting is supported for bookworm as well.
@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anand-kumar-subramanian anand-kumar-subramanian merged commit e06ff6c into sonic-net:master Feb 12, 2025
5 checks passed
@faraazbrcm
Copy link
Contributor Author

@faraazbrcm thank you for putting up this PR, do you have the time to move it forward and submit? We think the formatting cleanup and build check would be very helpful to have.

Its merged now

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.

7 participants