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

Add pre-commit hook with code formatting #58965

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nazolek
Copy link

@nazolek nazolek commented Nov 14, 2024

Add pre-commit hook with code formatter under the hood

In the context of PR, trying to solve an issue related to file formatting during pre-commit hook.

Description

The issue #30145 outlines the backward of the previous approach and why it was reverted. Based on that, wanna suggest some improvements:

  1. Working with the files only in staged/unstaged areas.
  2. Resolving the issue with partially committed files.
  3. Setting up the hook inside both build.ps1 and build.sh - Might need help with setting the hook up correctly

Fixes #27632

@nazolek nazolek requested review from wtgodbe and a team as code owners November 14, 2024 21:54
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Nov 14, 2024
@nazolek
Copy link
Author

nazolek commented Nov 14, 2024

@dotnet-policy-service agree

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Nov 14, 2024
Copy link
Contributor

Thanks for your PR, @nazolek. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add git pre-commit hooks for applying formatting to source
1 participant