Skip to content

Commit

Permalink
Run clang_format_check in deterministic location
Browse files Browse the repository at this point in the history
Implements #737
  • Loading branch information
wxmerkt committed Jan 6, 2022
1 parent 008159b commit 7f7c70b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions industrial_ci/src/tests/clang_format_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ function prepare_clang_format_check() {
true
}

function run_clang_format_check() {
local err=0
local path
ici_make_temp_dir path
function install_clang_format_check() {
local path=/tmp/clang_format_check
mkdir -p "$path"
ici_cleanup_later "$path"

# Check whether a specific version of clang-format is desired
local clang_format_executable="clang-format${CLANG_FORMAT_VERSION:+-$CLANG_FORMAT_VERSION}"
Expand All @@ -34,6 +34,11 @@ function run_clang_format_check() {
local sources=()
ici_parse_env_array sources TARGET_WORKSPACE
ici_step "prepare_sourcespace" ici_prepare_sourcespace "$path" "${sources[@]}"
}

function run_clang_format_check() {
local err=0
local path=/tmp/clang_format_check

ici_time_start run_clang_format_check
while read -r file; do
Expand Down

0 comments on commit 7f7c70b

Please sign in to comment.