Make sure to account for an undefined ANSWER_ENTRY_ORDER in the sin…
#2091
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Check Formatting of Code Base | |
| defaults: | |
| run: | |
| shell: bash | |
| on: | |
| push: | |
| branches-ignore: [main, develop] | |
| pull_request: | |
| jobs: | |
| perltidy: | |
| name: Check file formatting with perltidy and prettier | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y libmojolicious-perl cpanminus | |
| sudo cpanm -n Perl::Tidy@20260204 | |
| - name: Check Perl file formatting with perltidy | |
| shell: bash | |
| run: | | |
| git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| shopt -s extglob globstar nullglob | |
| perl_files=(./**/*.p[lm] ./**/*.t ./**/*.at) | |
| for f in bin/* bin/dev_scripts/*; do | |
| if [[ -f "$f" && ! "$f" == *.* ]]; then | |
| if head -n 1 "$f" | grep -qE '^#!.*(\bperl\b)'; then | |
| perl_files+=("$f") | |
| fi | |
| fi | |
| done | |
| if [ ${#perl_files[@]} -gt 0 ]; then | |
| perltidy --pro=./.perltidyrc -b -bext='/' "${perl_files[@]}" | |
| git diff --exit-code | |
| fi | |
| - name: Install Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| - name: Install Dependencies | |
| run: cd htdocs && npm ci --ignore-scripts | |
| - name: Check JavaScript, style, and HTML file formatting with prettier | |
| run: cd htdocs && npm run prettier-check |