Stefan Schake | 0234678 | 2018-05-05 02:39:33 +0200 | [diff] [blame] | 1 | image: ubuntu:16.04 |
| 2 | |
| 3 | before_script: |
| 4 | - apt-get --quiet update --yes >/dev/null |
| 5 | - apt-get --quiet install --yes clang-format-3.5 git >/dev/null |
| 6 | |
| 7 | stages: |
| 8 | - style |
| 9 | |
| 10 | clang-format: |
| 11 | stage: style |
| 12 | script: |
Stefan Schake | 10d90f5 | 2018-05-10 02:03:36 +0200 | [diff] [blame] | 13 | - git diff -U0 --no-color master...HEAD | clang-format-diff-3.5 -p 1 -style=file > format-fixup.patch |
Stefan Schake | 0234678 | 2018-05-05 02:39:33 +0200 | [diff] [blame] | 14 | - if [ -s format-fixup.patch ]; then cat format-fixup.patch && exit 1; fi |
| 15 | artifacts: |
| 16 | when: on_failure |
| 17 | paths: |
| 18 | - format-fixup.patch |