Skip to content

Add pre-commit hook for gofmt#26

Merged
andrewtavis merged 3 commits into
scribe-org:mainfrom
axif0:pre
Mar 6, 2025
Merged

Add pre-commit hook for gofmt#26
andrewtavis merged 3 commits into
scribe-org:mainfrom
axif0:pre

Conversation

@axif0

@axif0 axif0 commented Mar 6, 2025

Copy link
Copy Markdown
Member

Contributor checklist


Description

  • Adds pre-commit hook to auto-check Go formatting
  • Shows clear messages when files need formatting
  • Prevents commits until code is properly formatted

Related issue

@github-actions

github-actions Bot commented Mar 6, 2025

Copy link
Copy Markdown

Thank you for the pull request! ❤️

The Scribe-Server team will do our best to address your contribution as soon as we can. If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Data rooms once you're in. Also consider attending our bi-weekly Saturday dev syncs. It'd be great to meet you 😊

@github-actions

github-actions Bot commented Mar 6, 2025

Copy link
Copy Markdown

Maintainer Checklist

The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@axif0

axif0 commented Mar 6, 2025

Copy link
Copy Markdown
Member Author

As the license_header_check error occurred, If the PR approved, we might marge this PR before #23.

@andrewtavis

Copy link
Copy Markdown
Member

@axif0, don't we also want a GitHub Action in the .github/workflows directory to check the formatting on all files for pull requests? Would we be able to get that included in this PR as well? :)

@andrewtavis

Copy link
Copy Markdown
Member

Or I guess ultimately the beauty of the Makefile is that people have to install these, so it's not the case like pre-commit that we need to check on PRs as well if they didn't install :)

@andrewtavis andrewtavis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the changes here, @axif0! I removed the echo for trimming whitespace as it didn't make sense to me, but if it's needed then feel free to add it in to the other PR 😊

@andrewtavis

Copy link
Copy Markdown
Member

Merging this in and we can get the license headers from #23 as suggested :)

@andrewtavis
andrewtavis merged commit f025e0f into scribe-org:main Mar 6, 2025
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