diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2a2d0f93..0cdc31b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: make check-code-style + - run: KALEIDOSCOPE_CODE_FORMATTER=clang-format-12 make check-code-style check-shellcheck: runs-on: ubuntu-latest steps: diff --git a/bin/format-code.py b/bin/format-code.py index 59a464d4..f8eaf963 100755 --- a/bin/format-code.py +++ b/bin/format-code.py @@ -172,7 +172,9 @@ def main(): return 1 # Locate `clang-format` executable: - clang_format_exe = shutil.which('clang-format') + clang_format_exe = os.getenv('KALEIDOSCOPE_CODE_FORMATTER') + if clang_format_exe is None: + clang_format_exe = shutil.which('clang-format') logging.debug("Found `clang-format` executable: %s", clang_format_exe) clang_format_cmd = [clang_format_exe, '-i'] if opts.loglevel <= logging.INFO: