Skip to content

Remove the incompatibility (regression) between the -I and -Q options. #10620

Remove the incompatibility (regression) between the -I and -Q options.

Remove the incompatibility (regression) between the -I and -Q options. #10620

Workflow file for this run

# Workflow to validify the consistency of the codes
on:
push:
branches:
- master
- '[0-9]+.[0-9]+'
paths:
- 'src/**'
- 'cmake/**'
- '**/*.sh'
- '.github/workflows/code-validator.yml'
pull_request:
paths:
- 'src/**'
- 'cmake/**'
- '**/*.sh'
- '.github/workflows/code-validator.yml'
name: Code Validator
jobs:
code-validator:
name: Code Validator
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4.2.0
- name: Check PSL_strings.h
run: |
cd src/
bash gmt_make_PSL_strings.sh
if [[ $(git ls-files -m) ]]; then git --no-pager diff HEAD; exit 1; fi
cd ..
- name: Check gmt_enum_dict.h
run: |
cd src/
bash gmt_make_enum_dicts.sh
if [[ $(git ls-files -m) ]]; then git --no-pager diff HEAD; exit 1; fi
cd ..
- name: Check module purposes
run: |
cd src/
bash gmt_make_module_purpose.sh
if [[ $(git ls-files -m) ]]; then git --no-pager diff HEAD; exit 1; fi
cd ..
- name: Check GMT version year
run: |
current_year=$(date +%Y)
gmt_version_year=$(grep GMT_VERSION_YEAR cmake/ConfigDefault.cmake | awk -F'"' '{print $2}')
if [ "$current_year" != "$gmt_version_year" ]; then exit 1; fi
- name: Check execute permission of bash scripts
run: |
error=0
echo "Following bash scripts may not have execute permission:"
# exclude share/tools/gmt_functions.sh
for file in $(find . -name "*.sh" ! -path "./share/tools/gmt_functions.sh"); do
if [[ ! -x "$file" ]]; then
((++error))
echo "$error: $file"
fi
done
exit $error
- name: Check shebang of bash scripts
run: |
error=0
echo "Following bash scripts don't start with the shebang '#!/usr/bin/env bash'"
for file in $(find . -name "*.sh" ! -path "./share/tools/gmt_functions.sh" ! -path "./test/invalidate_modules.sh"); do
if [[ "$(head -n1 $file)" != "#!/usr/bin/env bash" ]]; then
((++error))
echo "$error: $file"
fi
done
exit $error