-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (41 loc) · 1.48 KB
/
i18n-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: i18n-check
on: [push]
jobs:
build:
name: i18n-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install i18n-check
run: |
git clone https://github.com/Blake-Madden/i18n-check.git --recurse-submodules
cd i18n-check
cmake ./
make -j4
cd ..
- name: analyze
run: |
# Ignore i18n-check's own folder.
# You can ignore other folders by adding a comma and the folder name
# after "--ignore=i18n-check".
./i18n-check/bin/i18n-check ./src --ignore=import,i18n-check,math,debug,base/colors.h,base/colors.cpp -q --enable=allI18N,allCodeFormatting -o i18nresults.txt
- name: review results
run: |
REPORTFILE=./i18nresults.txt
WARNINGSFILE=./warnings.txt
if test -f "$REPORTFILE"; then
cat "$REPORTFILE" > "$WARNINGSFILE"
# are there any warnings?
if grep -qP '\[[a-zA-Z0-9]+\]' "$WARNINGSFILE"; then
# print the remaining warnings
echo Warnings detected:
echo ==================
cat "$WARNINGSFILE" | grep -P '\[[a-zA-Z0-9]+\]'
# fail the job
exit 1
else
echo No issues detected
fi
else
echo "$REPORTFILE" not found
fi