Add FileMustStartWithPackageStatement check (#139) #34
This file contains 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: Publish checks to wiki | |
on: | |
push: | |
branches: [develop] | |
paths: | |
- .github/workflows/publish-checks-wiki.yml | |
- magik-checks/src/main/resources/nl/ramsolutions/sw/sonar/l10n/magik/rules/*.html | |
concurrency: | |
group: publish-checks-wiki | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
jobs: | |
publish-wiki: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install html2text==2024.2.26 | |
- run: | | |
mkdir -p wiki/checks | |
- run: | | |
for f in magik-checks/src/main/resources/nl/ramsolutions/sw/sonar/l10n/magik/rules/*.html | |
do | |
name=$(basename $f .html) | |
path=wiki/checks/Check-$name.md | |
echo "Generating $path" | |
html2text -b 0 $f > $path | |
echo "" >> $path | |
echo "NOTE: This page is generated. Any changes made to this page through the wiki will be lost in the future." >> $path | |
done | |
- run: | | |
path=wiki/checks/Checks-Index.md | |
echo "Checks available:" > $path | |
for f in magik-checks/src/main/resources/nl/ramsolutions/sw/sonar/l10n/magik/rules/*.html | |
do | |
name=$(basename $f .html) | |
wikipage=Check-$name | |
echo "" >> $path | |
echo "[[$name|$wikipage]]" >> $path | |
done | |
echo "" >> $path | |
echo "NOTE: This page is generated. Any changes made to this page through the wiki will be lost in the future." >> $path | |
- uses: Andrew-Chen-Wang/github-wiki-action@86138cbd6328b21d759e89ab6e6dd6a139b22270 | |
with: | |
path: wiki | |
#dry-run: true | |
if: ${{ github.repository_owner == 'StevenLooman' }} |