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: Add a pre-push hook that checks formatting #300

Merged
merged 1 commit into from
Oct 5, 2024
Merged

ci: Add a pre-push hook that checks formatting #300

merged 1 commit into from
Oct 5, 2024

Conversation

shpaass
Copy link
Owner

@shpaass shpaass commented Sep 19, 2024

Add a pre-push hook that checks formatting.

Add a script that enables this hook. It cannot be enabled automatically due to git security. Essentially, every contributor needs to run that script once on their machine to enable that hook.

Update the documentation to mention the script.

Fixes #295 ([Devops] Investigate git hooks for dotnet format)

Essentially, this PR prevents the issue where you pushed the code and discovered that the formatting check doesn't pass only at the PR stage.

configure.sh Outdated Show resolved Hide resolved
@shpaass
Copy link
Owner Author

shpaass commented Sep 29, 2024

Rebased on fresh master and added a new line at the end of the .sh file.

Copy link

@skullbearer skullbearer left a comment

Choose a reason for hiding this comment

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

I took time to review Docs/CodeStyle.md and the dotnet style formatter pages, as well as .editorconfig, and everything seems to line up.

Also add a script that enables this hook. It cannot be enabled
automatically due to git security. Essentially, every contributor
needs to run that script once on their machine to enable that hook.

Update the documentation to mention the script.

Fixes #295
@shpaass
Copy link
Owner Author

shpaass commented Oct 5, 2024

Rebased on fresh master

@shpaass shpaass merged commit c08ff29 into master Oct 5, 2024
1 check passed
@shpaass shpaass deleted the git-hook branch October 5, 2024 07:33
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.

Investigate git hooks for dotnet format
3 participants