ci: Split POTFILES check between C and JS

Regex are a crude tool for analyzing whether some code *calls* a
particular function. Spidermonkey has Reflect.parse() that returns
the AST of the passed in code, which allows for a much more precise
check for javascript.

The old script is still used for C code, where i18n-affecting changes
are much rarer.

Based heavily on Philip Chimento's mozjs migration script at
https://gitlab.gnome.org/ptomato/moz60tool.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1941>
This commit is contained in:
Florian Müllner 2021-08-09 04:00:43 +02:00 committed by Marge Bot
parent 53e623e49c
commit b9f38f95e3
3 changed files with 213 additions and 4 deletions

View file

@ -160,7 +160,7 @@ eslint_mr:
junit: ${LINT_MR_LOG}
when: always
potfile_check:
potfile_c_check:
extends:
- .fdo.distribution-image@fedora
- .gnome-shell.fedora:34
@ -168,6 +168,14 @@ potfile_check:
script:
- ./.gitlab-ci/check-potfiles.sh
potfile_js_check:
extends:
- .fdo.distribution-image@fedora
- .gnome-shell.fedora:34
stage: review
script:
- js78 -m .gitlab-ci/check-potfiles.js
no_template_check:
extends:
- .fdo.distribution-image@fedora