mirror of
https://github.com/eosswedenorg/thalos
synced 2026-11-03 04:56:44 +01:00
chore: add golangci-lint CI and fix lint violations
This commit is contained in:
parent
6013517fbf
commit
7bb3aba097
14 changed files with 105 additions and 38 deletions
30
.github/workflows/lint.yml
vendored
Normal file
30
.github/workflows/lint.yml
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
name: Lint
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
golangci-lint:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
module: [".", "api"]
|
||||
runs-on: ubuntu-latest
|
||||
name: golangci-lint (${{ matrix.module }})
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: ${{ matrix.module }}/go.mod
|
||||
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v9
|
||||
with:
|
||||
version: v2.12
|
||||
working-directory: ${{ matrix.module }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue