1
0
Fork 0
golang-github-nicholas-fedo.../.github/workflows/lint.yaml
Daniel Baumann c0c4addb85
Adding upstream version 0.8.9.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-22 10:16:14 +02:00

36 lines
904 B
YAML

name: Lint
on:
workflow_call:
permissions:
contents: read
jobs:
lint:
name: Run Linter
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
- name: Set up Go
uses: actions/setup-go@29694d72cd5e7ef3b09496b39f28a942af47737e
with:
go-version: "1.24.3"
- name: Install dependencies
run: go mod download
- name: Run golangci-lint
uses: golangci/golangci-lint-action@4d56fa9e3c67fb4afa92b38c99fc7f20f5eeff4e
with:
args: --timeout=5m --config= # Use default linter settings
- name: Format Go code
run: |
go fmt ./...
- name: Check for uncommitted changes after formatting
run: |
git diff --exit-code || (echo "Detected unformatted files. Run 'go fmt' to format your code."; exit 1)