Skip to content

Conversation

@m-kuhn
Copy link
Contributor

@m-kuhn m-kuhn commented Mar 4, 2024

Quality of life improvement

Using pre-commit hook to automatically format files

Install and enable pre-commit in your local git clone to automatically
have manifest files formatted whenever you git commit something.

pip install pre-commit
pre-commit install

@Thomas1664
Copy link

This doesn't solve the version db management. The issue with that is that we have to figure out when to use --overwrite-version. We could avoid this issue by comparing the version file with the one from the branch we want to merge into and only add the flag if they're not identical.

@m-kuhn
Copy link
Contributor Author

m-kuhn commented Mar 4, 2024

This doesn't solve the version db management.

Correct, this doesn't solve anything with versioning and just adds a simple formatter. I mentioned it in the other discussion as a starting point for generic vcpkg helper pre-commit hooks.

The issue with that is that we have to figure out when to use --overwrite-version. We could avoid this issue by comparing the version file with the one from the branch we want to merge into and only add the flag if they're not identical.

How would you determine the base branch (merge target) on the developer machine where this hook is run?

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.

3 participants