File tree Expand file tree Collapse file tree
.github/actions/run-clang-format Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 echo ::group::Install Dependencies
3636 eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
3737 echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
38- echo "/home/linuxbrew/.linuxbrew/opt/clang-format@19 /bin" >> $GITHUB_PATH
38+ echo "/home/linuxbrew/.linuxbrew/opt/clang-format@22 /bin" >> $GITHUB_PATH
3939 brew install --quiet zsh
4040 echo ::endgroup::
4141
@@ -50,11 +50,11 @@ runs:
5050 : Run clang-format 🐉
5151 if (( ${+RUNNER_DEBUG} )) setopt XTRACE
5252
53- print ::group::Install clang-format-19
54- brew install --quiet obsproject/tools/clang-format@19
53+ print ::group::Install clang-format-22
54+ brew install --quiet obsproject/tools/clang-format@22
5555 print ::endgroup::
5656
57- print ::group::Run clang-format-19
57+ print ::group::Run clang-format-22
5858 local -a changes=(${(s:,:)CHANGED_FILES//[\[\]\'\"]/})
5959 ./build-aux/run-clang-format --fail-${{ inputs.failCondition }} --check ${changes}
6060 print ::endgroup::
Original file line number Diff line number Diff line change @@ -33,25 +33,24 @@ invoke_formatter() {
3333
3434 case ${formatter} {
3535 clang)
36- if (( ${+commands[clang-format-19 ]} )) {
37- local formatter=clang-format-19
36+ if (( ${+commands[clang-format-22 ]} )) {
37+ local formatter=clang-format-22
3838 } elif (( ${+commands[clang-format]} )) {
3939 local formatter=clang-format
4040 } else {
41- log_error " No viable clang-format version found (required 19 .1.1 )"
41+ log_error " No viable clang-format version found (required 22 .1.3 )"
4242 exit 2
4343 }
4444
4545 local -a formatter_version=($( ${formatter} --version) )
4646
47- if ! is-at-least 19 .1.1 ${formatter_version[-1]} ; then
48- log_error " clang-format is not version 19 .1.1 or above (found ${formatter_version[-1]} ."
47+ if ! is-at-least 22 .1.3 ${formatter_version[-1]} ; then
48+ log_error " clang-format is not version 22 .1.3 or above (found ${formatter_version[-1]} ."
4949 exit 2
5050 fi
5151
52- if ! is-at-least ${formatter_version[-1]} 19.1.1; then
53- log_error " clang-format is more recent than version 19.1.1 (found ${formatter_version[-1]} )."
54- exit 2
52+ if ! is-at-least ${formatter_version[-1]} 22.1.3; then
53+ log_warning " clang-format is more recent than version 22.1.3 (found ${formatter_version[-1]} )."
5554 fi
5655
5756 if (( ! #source_files )) source_files=(( libobs| libobs-*| frontend| plugins| deps| shared| test)/**/* .(c| cpp| h| hpp| m| mm)(.N))
You can’t perform that action at this time.
0 commit comments