mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[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'.
This commit is contained in:
parent
cb08862674
commit
bcb3124141
@ -80,7 +80,7 @@ function ci_lint_text_files {
|
|||||||
}
|
}
|
||||||
ci_info "## LINTING: text files ##"
|
ci_info "## LINTING: text files ##"
|
||||||
ci_spawn "$CI_EDITORCONFIG_CHECKER" --version
|
ci_spawn "$CI_EDITORCONFIG_CHECKER" --version
|
||||||
ci_spawn "$CI_EDITORCONFIG_CHECKER" || {
|
ci_spawn "$CI_EDITORCONFIG_CHECKER" --config .editorconfig-checker.json || {
|
||||||
# Linting failed.
|
# Linting failed.
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
@ -93,7 +93,9 @@ function ci_lint_yaml_files {
|
|||||||
}
|
}
|
||||||
ci_info "## LINTING: YAML files ##"
|
ci_info "## LINTING: YAML files ##"
|
||||||
ci_spawn "$CI_YAMLLINT" --version
|
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
|
local my_file
|
||||||
while IFS="" read -r my_file
|
while IFS="" read -r my_file
|
||||||
do
|
do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user