To get linting on our CI runner, we can't just call staticcheck: it's not installed on the runner!
Before any steps that use the staticcheck command, you'll need to install it:
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
Add a new step to the same "style" job that currently only checks for go fmt issues. Run staticcheck after go fmt to make sure that formatting and linting issues are caught by our pipeline.
Commit and push your changes with the unused function to your branch with the open pull request. You should see your CI workflow fail since staticcheck will catch the unused function.
Once you've verified that your CI workflow fails, remove the unused function and commit and push your changes again. Your CI workflow should now pass!
Paste the URL of your GitHub repo into the box and run the GitHub checks.
You can use the official Staticcheck GitHub Action instead.