From 5f38d833e41eae975d7cf791f10135fe5f52941a Mon Sep 17 00:00:00 2001 From: Valentyne Stigloher Date: Sun, 21 Jan 2024 13:30:48 +0100 Subject: [PATCH] (ci) fix check for fixable lint problems --- .gitlab-ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6df83498d..caed1d31c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,12 +17,16 @@ lint: - echo -e "\e[0Ksection_end:`date +%s`:install_dependencies\r\e[0K" - echo -e "\e[0Ksection_start:`date +%s`:reset_dependencies\r\e[0KReset Dependencies" - - git restore package.json + - git restore package.json yarn.lock - echo -e "\e[0Ksection_end:`date +%s`:reset_dependencies\r\e[0K" - - yarn lint --format gitlab --color | tee lint.log | tail -n 50 - # fail the build if any fixable warning is found (mostly formatting) - - '! grep "potentially fixable" lint.log' + - echo -e "\e[0Ksection_start:`date +%s`:check_lints\r\e[0KCheck linting rules" + - yarn lint --format gitlab --color --fix | tail -n 50 + - echo -e "\e[0Ksection_end:`date +%s`:check_lints\r\e[0K" + + - echo -e "\e[0Ksection_start:`date +%s`:check_fixable\r\e[0KCheck for fixable problems" + - git diff --stat --exit-code + - echo -e "\e[0Ksection_end:`date +%s`:check_fixable\r\e[0K" artifacts: reports: codequality: gl-codequality.json