Update code-quality.yml #6
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: Code Quality | |
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| quality-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: | | |
| sudo apt-get update | |
| sudo apt-get install -y shellcheck | |
| - run: | | |
| mkdir -p quality | |
| : > quality/log.txt | |
| echo "CODE QUALITY REPORT" >> quality/log.txt | |
| echo "===================" >> quality/log.txt | |
| echo "" >> quality/log.txt | |
| echo "SHELLCHECK (.sh)" >> quality/log.txt | |
| echo "----------------" >> quality/log.txt | |
| find nil -type f -name "*.sh" -exec shellcheck {} + >> quality/log.txt 2>&1 || true | |
| echo "" >> quality/log.txt | |
| echo "VBSCRIPT (.vbs)" >> quality/log.txt | |
| echo "---------------" >> quality/log.txt | |
| find nil -type f -name "*.vbs" -exec grep -L "Option Explicit" {} + >> quality/log.txt 2>&1 || true | |
| echo "" >> quality/log.txt | |
| echo "END OF REPORT" >> quality/log.txt | |
| - run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add nil quality/log.txt | |
| git diff --cached --quiet || git commit -m "Code quality report" | |
| - uses: peter-evans/create-pull-request@v6 | |
| with: | |
| branch: code-quality-report | |
| title: Code Quality Report | |
| body: | | |
| Automated code quality check completed. |