.gitlab-ci.yml 445 B

123456789101112131415
  1. image: docker:git
  2. stages:
  3. - checks
  4. check-lint:
  5. image: xianpengshen/clang-tools:14
  6. stage: checks
  7. script:
  8. - linter_errors=$(clang-format -n ./src/* ./include/* 2>&1 | grep -v --color=never "no modified files to format" || true)
  9. - echo "$linter_errors"
  10. - if [[ ! -z "$linter_errors" ]]; then echo "Detected formatting issues; please fix"; exit 1; else echo "Formatting is correct"; exit 0; fi