Skip to content

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 a team and wtgodbe as code owners November 14, 2024 21:54
@ghost ghost 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
@dotnet-policy-service
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.

@wtgodbe
Copy link
Member

wtgodbe commented Nov 19, 2024

Thanks for the change! Looks like the original blocking issue has been fixed, and this does solve the build.sh problem - @SteveSandersonMS, any concerns with this approach?

@dotnet-policy-service
Copy link
Contributor

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run comment here (requires commit rights), or by simply closing and reopening.

@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Nov 26, 2024
@danmoseley danmoseley requested a review from Copilot February 14, 2025 04:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

Files not reviewed (3)
  • .githooks/pre-commit: Language not supported
  • eng/build.ps1: Language not supported
  • eng/build.sh: Language not supported

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 pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add git pre-commit hooks for applying formatting to source

2 participants