Skip to content

Commit

Permalink
Merge updated format scripts
Browse files Browse the repository at this point in the history
* Ignore deleted file in format scripts
* Use clang-format-9 in CI
* Update git-cmake-format version

Related PR: #738
  • Loading branch information
upsj authored Apr 9, 2021
2 parents 58c9425 + c4545b0 commit 5fd5d0d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/bot-pr-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ bot_get_all_changed_files() {
while true; do
# this api allows 100 items per page
# github action uses `bash -e`. The last empty page will leads jq error, use `|| :` to ignore the error.
local pr_page_files=$(api_get "$pr_url/files?&per_page=100&page=${page}" | jq -er '.[] | .filename' || :)
local pr_page_files=$(api_get "$pr_url/files?&per_page=100&page=${page}" | jq -er '.[] | select(.status != "removed") | .filename' || :)
if [ "${pr_page_files}" = "" ]; then
break
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/bot-pr-format-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ cp /tmp/format_header.sh dev_tools/scripts/
cp /tmp/update_ginkgo_header.sh dev_tools/scripts/

# format files
CLANG_FORMAT=clang-format-8
CLANG_FORMAT=clang-format-9
dev_tools/scripts/add_license.sh
dev_tools/scripts/update_ginkgo_header.sh
for f in $(echo "$TO_FORMAT" | grep -E $FORMAT_HEADER_REGEX); do dev_tools/scripts/format_header.sh "$f"; done
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The Ginkgo CUDA module has the following __additional__ requirements:
In addition, if you want to contribute code to Ginkgo, you will also need the
following:

* _clang-format 5.0.0+_ (ships as part of _clang_)
* _clang-format 8.0.0+_ (ships as part of _clang_)
* _clang-tidy_ (optional, when setting the flag `-DGINKGO_WITH_CLANG_TIDY=ON`)
* _iwyu_ (Include What You Use, optional, when setting the flag `-DGINKGO_WITH_IWYU=ON`)

Expand Down
4 changes: 2 additions & 2 deletions third_party/git-cmake-format/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
message(STATUS "Configuring and building git-cmake-format")
ginkgo_load_git_package(git-cmake-format
"https://github.com/ginkgo-project/git-cmake-format.git"
"29c23665d624e1cae1308bec651706fdaa8fe38b"
"-DGCF_CLANGFORMAT_MINIMAL_VERSION=5.0.0")
"be9554a5d71030dcc23f1eb355c41ab9d876e776"
"-DGCF_CLANGFORMAT_MINIMAL_VERSION=8.0.0")
add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}/build EXCLUDE_FROM_ALL)

0 comments on commit 5fd5d0d

Please sign in to comment.