Skip to content
Snippets Groups Projects
Verified Commit d8381cbd authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

fix: remove false positives about linting


Previously `grep` mangled exit code for job because when grep doesn't
find any matching lines, it returns 1, which invalidates our
pipeline. On the other hand, any found errors are treated as expected
result because lines matched and grep returned valid exit code `0`.

Mitigate this behavior by manually overriding exit code with simple
boolean gate.

Signed-off-by: default avatarBart Jaskulski <bjaskulski@protonmail.com>
parent 9c987175
No related branches found
No related tags found
No related merge requests found
......@@ -2,11 +2,11 @@
stage: tests
script:
- composer install --no-dev
- find -name '*.php' -print0 |xargs -n1 -0 -P16 php -l |grep -v "No syntax errors detected"
- find -name '*.php' -print0 |xargs -n1 -0 -P16 php -l |grep -v "No syntax errors detected" || exit 0
lint:8.1:
lint:8.2:
<<: *lint-tmpl
image: gitlab.wpdesk.dev:5050/wpdesk/docker-tests/php-box:8.1
image: gitlab.wpdesk.dev:5050/wpdesk/docker-tests/php-box:8.2
lint:7.2:
<<: *lint-tmpl
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment