fix - trying to crash GA with lint #3
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: Lint Code | |
on: | |
push: | |
branches: [ main, lint ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23.1 | |
- name: Install Linter | |
run: go install golang.org/x/lint/golint | |
- name: Lint the project | |
run: | | |
output=$(golint ./...) | |
if [ -n "$output" ]; then | |
echo "$output" | |
echo "golint found issues. Please fix them before merging." | |
exit 1 | |
else | |
echo "No linting issues found." | |
fi | |