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 configuration #338

Merged
merged 3 commits into from
Jan 14, 2025

Conversation

skosukhin
Copy link
Collaborator

This adds the pre-commit configuration file and switches to the pre-commit action in the CI job.

@RobertPincus
Copy link
Member

@skosukhin Why do you specify the file pattern for the CMake formatting explicitly? The example doesn't require a pattern.

@skosukhin
Copy link
Collaborator Author

I don't specify the file pattern either (see here and here). However, I tell cmake-format and cmake-lint to additionally check files with the .cmake.in extension, which are templates for automatically generated cmake files (e.g. see here) and are not recognized as cmake ones. So, I override the file filtering parameters as described in the documentation (see the bottom of this paragraph).

@skosukhin
Copy link
Collaborator Author

By the way, should I remove this line in this PR?

@RobertPincus
Copy link
Member

By the way, should I remove this line in this PR?

Yes please. I will approve now - please merge onto develop when you're ready.

Copy link
Member

@RobertPincus RobertPincus left a comment

Choose a reason for hiding this comment

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

Great, it's more elegant to use pre-commit locally and for the CI.

@skosukhin skosukhin merged commit e7bf3e2 into earth-system-radiation:develop Jan 14, 2025
37 checks passed
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