This repository was archived by the owner on May 21, 2025. It is now read-only.
Take into account embedded newlines in strings when classifying them #127
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: i18n-check | |
| on: [push] | |
| jobs: | |
| build: | |
| name: unix build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: 'true' | |
| - name: install tools | |
| run: | | |
| sudo apt install cmake | |
| - name: build | |
| run: | | |
| cmake ./ | |
| make -j4 | |
| - name: analyze | |
| run: | | |
| # just analyze code formatting while we are here | |
| cd bin | |
| ./quneiform ../src --ignore=cxxopts,utfcpp --enable=allCodeFormatting -q -o i18nresults.txt | |
| - name: review results | |
| run: | | |
| cd bin | |
| 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 |