diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e2292bde8..1afdac6e5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,8 +24,8 @@ jobs: uses: crate-ci/typos@bcafd462cb07ef7ba57e34abf458fe20767e808b # v1.19.0 python-format: - name: python format - runs-on: ubuntu-20.04 + name: code formatting + runs-on: ubuntu-24.04 steps: - uses: actions/setup-python@v5 with: diff --git a/scripts/check-format b/scripts/check-format index 7993c3d82..2d2036dbf 100755 --- a/scripts/check-format +++ b/scripts/check-format @@ -5,6 +5,7 @@ if command -v black 2>&1 > /dev/null ; then # awk cmd copied from: # https://unix.stackexchange.com/questions/66097/find-all-files-with-a-python-shebang find src t -path "src/python/fluxion/jsongraph" -prune -o \ + -path "t/python/pycotap" -prune -o \ -type f \( -name "*.py" -print -o \ -exec awk ' /^#!.*python/{print FILENAME} {nextfile}' {} + \) \ | xargs black --check --diff @@ -12,3 +13,9 @@ else echo "black not found, failing" exit 1 fi + +find resource qmanager src/ -name '*.h' -o -name '*.c' -o -name '*.cpp' -o -name '*.hpp' | + grep -v yggdrasil | + grep -v 'json.hpp' | + grep -v libtap | + xargs -P 8 -n 1 clang-format --dry-run --Werror