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

Clang-format support #117

Merged
merged 19 commits into from
Jan 6, 2025
Merged

Clang-format support #117

merged 19 commits into from
Jan 6, 2025

Conversation

ebchin
Copy link
Member

@ebchin ebchin commented Dec 23, 2024

  • Adds a .clang-format custom style (based on Serac).
  • Runs clang-format on all header and source files in src
  • Adds an azure pipeline to verify formatting with clang-format 14 upon pushing to GitHub
  • Also turns on checks for header files and code coverage (based on implementations in Serac)
  • NOTE: Documentation check is working, but doxygen comments need to be fixed before this check can be enabled. Defer this to a future PR.
  • Once the PR is merged into develop, leaving a comment /style in the PR should run clang-format to apply style to code (see this Serac PR for more details)

@@ -142,7 +142,7 @@ class Tribol(CachedCMakePackage, CudaPackage, ROCmPackage):
depends_on("python", when="+devtools")
depends_on("py-shroud", when="+devtools+fortran")
depends_on("py-sphinx", when="+devtools")
depends_on("llvm+clang@10.0.0", when="+devtools", type="build")
depends_on("llvm+clang@14:", when="+devtools", type="build")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
depends_on("llvm+clang@14:", when="+devtools", type="build")
depends_on("llvm+clang@14", when="+devtools", type="build")

i would recommend this as major clang-format versions produce different style

@ebchin ebchin self-assigned this Dec 27, 2024
@ebchin
Copy link
Member Author

ebchin commented Dec 27, 2024

This one should be good to go now

Copy link
Collaborator

@srwopschall srwopschall left a comment

Choose a reason for hiding this comment

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

@ebchin - Thanks for tackling this. Looks great. Test 'make style' and add spacing formatting as discussed.

@ebchin ebchin merged commit 87b8f19 into develop Jan 6, 2025
10 checks passed
@ebchin ebchin linked an issue Jan 24, 2025 that may be closed by this pull request
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.

Add clang-format based linting to tribol
3 participants