From d641385baff2917cd66bafadf37a4ed0970941ef Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Mon, 15 Oct 2018 16:07:51 +0200 Subject: [PATCH] Add php syntax check via GitLab CI --- .gitignore | 3 ++- .gitlab-ci.yml | 18 ++++++++++++++++++ .phplint.yml | 9 +++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci.yml create mode 100644 .phplint.yml diff --git a/.gitignore b/.gitignore index 1a3b8bd98e..d42aee61f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .DS_Store -/nbproject/private/ \ No newline at end of file +/nbproject/private/ +.phplint-cache diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000..1c50a28b19 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,18 @@ +# Defines stages which are to be executed +stages: + - syntax + +# +### Stage syntax +# + +syntax:lint: + stage: syntax + image: bobey/docker-gitlab-ci-runner-php7 + allow_failure: false + + script: + - composer require overtrue/phplint + - echo "Syntax checking PHP files" + - echo "For more information http://www.icosaedro.it/phplint/" + - vendor/bin/phplint diff --git a/.phplint.yml b/.phplint.yml new file mode 100644 index 0000000000..10fd2a25af --- /dev/null +++ b/.phplint.yml @@ -0,0 +1,9 @@ +path: ./ +jobs: 10 +cache: .phplint-cache +extensions: + - php + - lng +exclude: + - vendor + -- GitLab