.gitlab-ci.yml 707 Bytes
Newer Older
Felipe Lema's avatar
Felipe Lema committed
1
2
3
4
5
6
7
8
9
10
11
variables:   
  DEBIAN_FRONTEND: "noninteractive" 

clang_format:   
  stage: build   
  image: debian:testing   
  only:     
    - merge_requests     
    - master   
  before_script:     
    - apt-get update     
12
13
    - apt-get install --yes --no-install-recommends wget ca-certificates git clang-format-11   
    - update-ca-certificates
Felipe Lema's avatar
Felipe Lema committed
14
15
  script:     
    - wget -c --output-document=.clang-format https://invent.kde.org/frameworks/extra-cmake-modules/raw/master/kde-modules/clang-format.cmake
16
    - git diff-tree --no-commit-id --name-only -r origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME -r $CI_COMMIT_SHA | grep -P '[.](c|cc|cpp|hpp|h)$'| xargs --verbose clang-format-11 -i
Felipe Lema's avatar
Felipe Lema committed
17
    - git diff --exit-code