I’m trying to set up a test CI environment so that we can work out what needs to happen for our production code. But I’m having problems getting things to work as expected.
image: docker:latest services: - docker:dind build: stage: build script: - docker build -t test . include: - template: Code-Quality.gitlab-ci.yml
plugins: phpcodesniffer: enabled: true config: standard: "PSR1,PSR2" phpmd: enabled: true config: file_extensions: "php" eslint: enabled: true channel: "eslint-6" file_extensions: "js"
env: browser: true commonjs: true es6: true extends: - airbnb - prettier #parser: parserOptions: ecmaVersion: 11 plugins: - prettier rules: prettier/prettier: 1 no-undef: 1 no-unused-vars: 1 camelcase: 1
So far as I can see from the docs, this should be sufficient to get a basic version of linting working. And the PHPCodeSniffer works, but when I try and add the PHPMD or ESLint plugins, I get error messages like
error: (Psych::SyntaxError) (<unknown>): mapping values are not allowed in this context at line 13 column 14
WARNING: gl-code-quality-report.json: no matching files.
On the Pipelines page it tells me “Test passed with warnings”, the warning being that the
code_quality test failed, but was allowed to. (And presumably failed because it couldn’t run, not because it didn’t meet standards).
Can anyone help me figure out what I’m doing wrong? Am I missing something obvious? Thanks very much for your help.