Fix handling of empty config file #591
Workflow file for this run
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: Checks | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| Golangci-Lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26" | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: "v2.11" | |
| args: "cmd/..." | |
| Go-Fmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26" | |
| - name: Run fmt | |
| run: | | |
| gofmt_files=$(gofmt -l cmd) | |
| if [[ -n ${gofmt_files} ]]; then | |
| echo 'gofmt needs running on the following files:' | |
| echo "${gofmt_files}" | |
| exit 1 | |
| fi | |
| exit 0 |