Add a dockerfile to make pretty#7324
Add a dockerfile to make pretty#7324Growl1234 wants to merge 14 commits intodeepmodeling:developfrom
Conversation
Use tools what GitHub Precommit workflow uses
|
@Growl1234 Why there are so many |
This is an automatic workflow and the PR is currently just a draft. The problems introduced here would all be fixed before this PR is marked as ready. |
|
And it seems at least those settings in |
3a1e99b to
8bdd60f
Compare
91183dc to
d0e4601
Compare
c120da8 to
497f4ac
Compare
|
It seems the precommit workflow would check on code outside abacus and give error about them (such as OpenMPI). Although there might be ways to solve the problem, I do not think the current approach is reliable enough for ABACUS. We should stop directly relying on the generic pre-commit/action clang-tidy workflow and instead switch to a project-controlled DIY workflow, i.e. the “ideal long-term solution” mentioned above. This would allow us to explicitly restrict both the checked files and the fix-it scope to ABACUS source files. |
This is a first try to take on code checking and prettifying that is temporily dropped in the GitHub Actions workflow.
This dockerfile uses tools same as what GitHub Precommit workflow uses, and execute
clang-tidy --fixandclang-formatto make-pretty the C++ codes.If this approach can be successful, here are what to do:
clang-tidyin parallel.An ideal long-term solution would be to take inspiration from CP2K’s approach and implement a complete and reliable pre-commit workflow.