From bcb312414161d339fa97fec4d8d14e483a1efc07 Mon Sep 17 00:00:00 2001 From: Cosmin Truta Date: Tue, 17 Sep 2024 16:00:48 +0300 Subject: [PATCH] [libpng16] ci: Update ci_lint.sh to recognize .editorconfig-checker.json As the editorconfig-checker program is transitioning from using the .ecrc config file to the .editorconfig-checker.json config file, the older program versions do not recognize the new config file name. Update ci_lint.sh to instruct editorconfig-checker to pick up its configuration from the new config file name, regardless of the program version. Also update ci_lint.sh to instruct yamllint to check all *.json files, including .editorconfig-checker.json. This is a cherry-pick of commit 77f88338a19a223cc678e1a6a04888a31c78dabf from branch 'libpng18'. --- ci/ci_lint.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ci/ci_lint.sh b/ci/ci_lint.sh index d1754715d..163d955de 100755 --- a/ci/ci_lint.sh +++ b/ci/ci_lint.sh @@ -80,7 +80,7 @@ function ci_lint_text_files { } ci_info "## LINTING: text files ##" ci_spawn "$CI_EDITORCONFIG_CHECKER" --version - ci_spawn "$CI_EDITORCONFIG_CHECKER" || { + ci_spawn "$CI_EDITORCONFIG_CHECKER" --config .editorconfig-checker.json || { # Linting failed. return 1 } @@ -93,7 +93,9 @@ function ci_lint_yaml_files { } ci_info "## LINTING: YAML files ##" ci_spawn "$CI_YAMLLINT" --version - find . \( -iname "*.yml" -o -iname "*.yaml" \) -not -path "./out/*" | { + # Considering that the YAML format is an extension of the JSON format, + # we can lint both the YAML files and the plain JSON files here. + find . \( -iname "*.yml" -o -iname "*.yaml" -o -iname "*.json" \) -not -path "./out/*" | { local my_file while IFS="" read -r my_file do