Skip to content

Address PR comments. #64

Address PR comments.

Address PR comments. #64

Workflow file for this run

name: Static checks - misspell
on: push
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: egde-resource-mgr-'${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
static-checks:
runs-on: ubuntu-22.04
env:
SUMMARY_FILE: summary.log
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
# Need to run this 1st, so that the other log files do not cause unnecessary findings
- name: Run misspell
if: always()
run: |
# Remove the vendor folder - we don't need to check that.
rm -rf vendor
go install github.com/golangci/misspell/cmd/misspell@latest
misspell -i mosquitto . >misspell.log
echo "## Summary" >>$SUMMARY_FILE
echo "### misspell" >>$SUMMARY_FILE
cat misspell.log >>$SUMMARY_FILE
lines=$(wc -l < "misspell.log")
if [[ $lines -gt 0 ]]; then
echo "Misspell has findings, fail."
echo "TEST_FAIL=true" >> $GITHUB_ENV
exit 1
else
echo "No findings." >>$SUMMARY_FILE
fi
- name: Write summary
if: always()
run: cat $SUMMARY_FILE >>$GITHUB_STEP_SUMMARY