From ca4c07cb7075de85e64890161024fdb98d00c644 Mon Sep 17 00:00:00 2001 From: ralfulrich <ralf.ulrich@kit.edu> Date: Sat, 3 Oct 2020 08:58:43 +0200 Subject: [PATCH] clang-format is (now) part of container --- .gitlab-ci.yml | 4 +--- do-clang-format.py | 5 ++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9328bd1c5..8f9f0c956 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,9 +54,7 @@ check-copyrights: ########################################################## check-clang-format: - image: corsika/devel:u-18.04 - before_script: - - apt-get update && apt-get install -y -qq clang-format + image: corsika/devel:clang-8 stage: quality tags: - corsika diff --git a/do-clang-format.py b/do-clang-format.py index 3b760eadb..b2a202064 100755 --- a/do-clang-format.py +++ b/do-clang-format.py @@ -49,7 +49,10 @@ else: filelist = [x for x in filelist if "ThirdParty" not in x and (x.endswith(".h") or x.endswith(".cc"))] -cmd = "clang-format -style=file" +cmd = "clang-format" +if "CLANG_FORMAT" in os.environ: + cmd = os.environ["CLANG_FORMAT"] +cmd += " -style=file" if args.apply: for filename in filelist: subp.check_call(cmd.split() + ["-i", filename]) -- GitLab