perlcheck: add script, run in CI, fix fallouts

Add script to run all Perl sources through `perl -c` to ensure no
issues, and run this script via GHA/checksrc in CI.

Fallouts:
- fix two repeated declarations.
- move `shell_quote()` from `testutil.pm` to `pathhelp.pm`, to
  avoid circular dependency in `globalconfig.pm`.

Closes #18745
This commit is contained in:
Viktor Szakats 2025-09-25 01:54:28 +02:00
parent 72f72f678d
commit 34b1e146e4
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
11 changed files with 84 additions and 30 deletions

View file

@ -82,6 +82,10 @@ jobs:
source ~/venv/bin/activate
scripts/cmakelint.sh
- name: 'perlcheck'
run: |
scripts/perlcheck.sh
- name: 'pytype'
run: |
source ~/venv/bin/activate