Skip to content

Conversation

@zeschg
Copy link
Contributor

@zeschg zeschg commented Nov 3, 2025

Motivation and Proposed Changes

The current pre-commit hook does not work with partial staging. If e.g. only a part of a file is set for staging (using git add -p), the pre-commit hook formats the whole file and adds the whole file back to staging.

This PR improves the pre-commit hook so that it works well with partial staging and formats only the already staged lines.

Checklist

Before requesting a review, please ensure the following:

  • Commit history is clean and meaningful
  • License and copyright headers are present and up to date
  • SonarCloud report has been reviewed; no obvious improvements possible with reasonable effort
  • Documentation has been updated or extended (if applicable)
  • If this PR affects other repositories in the namespace, an issue has been opened and linked accordingly

@zeschg zeschg self-assigned this Nov 3, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 3, 2025

@zeschg zeschg requested review from LucianUngurean-S and removed request for LucianUngurean-S November 3, 2025 12:57
@zeschg zeschg marked this pull request as draft November 3, 2025 13:41
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