From 66c8eb827177d4fa69cb001c267db4ad3392aaac Mon Sep 17 00:00:00 2001 From: "ryan.danehy@pnnl.gov" Date: Fri, 8 Dec 2023 11:43:41 -0800 Subject: [PATCH] add final touches --- .clang-format | 1 + README.md | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index 7fd91b83e..e5ef389ba 100644 --- a/.clang-format +++ b/.clang-format @@ -20,6 +20,7 @@ IndentCaseLabels: 'true' IndentWidth: '2' NamespaceIndentation: All PointerAlignment: Left +SortIncludes: SI_Never SpaceAfterCStyleCast: 'true' SpaceAfterLogicalNot: 'false' SpaceAfterTemplateKeyword: 'false' diff --git a/README.md b/README.md index 1ba6c64f2..256bf560f 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,27 @@ target_link_libraries(my_app PRIVATE ReSolve::ReSolve) For all contributions to ReSolve please follow the [developer guidelines](CONTRIBUTING.md) +### Pre-commit +Precommit is a framework for mmangaing and maintain multi-lanagueg pre-commit hooks. https://pre-commit.com/ +Precommit is auto applied through CI to every pull request and every commit to the said pull request. Precommit checks for valid yaml files, end of file spaces, Syntax of C codeand etc. To see specifically what formating precommit looks for please check out our .clang-format and .cmake-format filed as well as our .pre-commit-config.yaml which show the specific precommit hooks being applied. + +### Running Pre-commit locally +To run pre-commit locally you first must install pre-commit. It can be installed via +```shell +pip install pre-commit +``` + +To install the hooks and have pre-commit run automatically before every commit run +```shell +pre-commit install +``` + +If you want to manually run all pre-commit hooks on a repository, run +```shell +pre-commit run --all-files +``` +To learn more about pre-commit usuage check out https://pre-commit.com/#usage. ## Test and Deploy @@ -111,4 +131,3 @@ contributions to ReSolve must be made under the smae licensing terms. **Please Note** If you are using ReSolve with any third party libraries linked in (e.g., KLU), be sure to review the respective license of the package as that license may have more restrictive terms than the ReSolve license. -