Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: lint

on:
pull_request:
branches: [main, master]
paths:
- 'mc2mc/**'

permissions:
contents: read

jobs:
golangci-lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: mc2mc/go.mod
cache: false

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.10.1
working-directory: mc2mc
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ on:
- 'mc2mc/v*'

jobs:
lint:
if: startsWith(github.ref, 'refs/tags/mc2mc/v')
name: golangci-lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: mc2mc/go.mod
cache: false

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.10.1
working-directory: mc2mc

bq2bq:
if: startsWith(github.ref, 'refs/tags/bq2bq/v')
runs-on: ubuntu-latest
Expand Down Expand Up @@ -44,6 +64,7 @@ jobs:
run: docker logout
mc2mc:
if: startsWith(github.ref, 'refs/tags/mc2mc/v')
needs: lint
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
18 changes: 18 additions & 0 deletions mc2mc/.golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: "2"

linters:
default: none
enable:
- govet
- staticcheck
- ineffassign
- unused
- copyloopvar
settings:
staticcheck:
checks:
- "SA*"

issues:
max-issues-per-linter: 0
max-same-issues: 0
Loading