summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/ci/branches/master/.gitlab-ci.yml11
-rwxr-xr-xtools/ci/jobs/cpplint.sh4
2 files changed, 12 insertions, 3 deletions
diff --git a/tools/ci/branches/master/.gitlab-ci.yml b/tools/ci/branches/master/.gitlab-ci.yml
index 610c4dfda..c2ad2ca89 100644
--- a/tools/ci/branches/master/.gitlab-ci.yml
+++ b/tools/ci/branches/master/.gitlab-ci.yml
@@ -267,12 +267,21 @@ mplint:
PACKAGES: gcc g++ git
make autoconf automake autopoint gettext
+cpplint_line_length_warning:
+ stage: prebuild
+ script:
+ - ./tools/ci/jobs/cpplint.sh --linelength=80
+ <<: *job-push
+ variables:
+ PACKAGES: wget grep
+ allow_failure: true
+
linters:
stage: prebuild
script:
- ./tools/ci/jobs/pngcheck.sh
- ./tools/ci/jobs/imagemagiccheck.sh
- - ./tools/ci/jobs/cpplint.sh
+ - ./tools/ci/jobs/cpplint.sh --linelength=120
- ./tools/ci/jobs/nsiqcppstyle.sh
<<: *job-push
variables:
diff --git a/tools/ci/jobs/cpplint.sh b/tools/ci/jobs/cpplint.sh
index 7bbccf271..0f63a77e3 100755
--- a/tools/ci/jobs/cpplint.sh
+++ b/tools/ci/jobs/cpplint.sh
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
-
+# Extra arguments will be passed to cpplint
export LOGFILE=cpplint.log
source ./tools/ci/scripts/init.sh
@@ -43,7 +43,7 @@ args+=("--filter=\
find src \
-type f \
-name "*.cpp" -o -name "*.hpp" -o -name "*.h" -o -name "*.cc" \
- -exec ./cpplint.py "${args[@]}" {} \+ 2>${ERRFILE}2
+ -exec ./cpplint.py "${args[@]}" "$@" {} \+ 2>${ERRFILE}2
grep ": " ${ERRFILE}2 | grep -v -e "src/debug/" \
-e "unittests/doctest.h" \