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

feat: add pre-commit automatic code formatting tool #19

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lobis
Copy link
Contributor

@lobis lobis commented Dec 12, 2023

Add .pre-commit-config.yaml configuration file for pre-commit tool.

This will run some code formatting automatically: clang-format, black, formatting cmake files, etc.

The pre-commit bot can be configured to automatically enforce this style in PRs.

I have not formatted the whole repo using this configuration file as it would be a very big diff. If you agree on using pre-commit, we could let the CI bot do it.

@lobis lobis marked this pull request as ready for review December 12, 2023 17:10
@HaarigerHarald
Copy link
Owner

Thanks, I'm not sure about using all those formatters but clang-format as pre-commit hook is definitely a nice addition.

@lobis
Copy link
Contributor Author

lobis commented Dec 18, 2023

Thanks, I'm not sure about using all those formatters but clang-format as pre-commit hook is definitely a nice addition.

I can simplify the list for now.

Most come from https://github.com/scientific-python/cookie/blob/main/.pre-commit-config.yaml which I would say is the standard for modern scientific Python repositories.

I'll finish this PR and tag you when it's done.

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.

None yet

2 participants