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

CI: Run gofmt and clang-format automatically on pull requests #233

Merged
merged 3 commits into from
Nov 18, 2021

Conversation

dylanahsmith
Copy link
Collaborator

Problem

It is easy to forget to run go fmt or go generate to format the code. This results in these changes ending up in following PRs and even get squashed into them due to the PRs being squash merged.

Solution

Add a CI step that will fail if the code wasn't formatted and show the missing format changes.

@codecov
Copy link

codecov bot commented Nov 17, 2021

Codecov Report

Merging #233 (f0f5bf9) into master (64149e7) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #233   +/-   ##
=======================================
  Coverage   95.86%   95.86%           
=======================================
  Files          17       17           
  Lines         580      580           
=======================================
  Hits          556      556           
  Misses         15       15           
  Partials        9        9           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64149e7...f0f5bf9. Read the comment docs.

@dylanahsmith dylanahsmith merged commit abaa636 into master Nov 18, 2021
@dylanahsmith dylanahsmith deleted the ci-fmt branch November 18, 2021 12:26
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