(ci) fix check for fixable lint problems

This commit is contained in:
Valentyne Stigloher 2024-01-21 13:30:48 +01:00
parent 6963425947
commit 5f38d833e4

View File

@ -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