From 4ee94ec2332316abf3dabf317a532c0fd47f31dd Mon Sep 17 00:00:00 2001 From: David Vogel Date: Thu, 27 Feb 2025 17:29:42 +0100 Subject: [PATCH] Add golangci-lint to GitHub actions --- .github/workflows/lint.yml | 29 +++++++++++++++++++++++++++++ .vscode/settings.json | 1 + 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..b3c4fd6 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,29 @@ +name: golangci-lint +on: + push: + branches: + - main + pull_request: + +permissions: + contents: read + # Optional: allow read access to pull request. Use with `only-new-issues` option. + # pull-requests: read + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: stable + + - name: Check out code + uses: actions/checkout@v4 + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: v1.64 \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 8e9c885..8c8f5d7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,6 +2,7 @@ "cSpell.words": [ "Dadido", "Foogaloo", + "golangci", "typst", "Vogel" ]