Skip to content

Commit

Permalink
Switch Go linting to golangci-lint
Browse files Browse the repository at this point in the history
Signed-off-by: Marcela Melara <[email protected]>
  • Loading branch information
marcelamelara committed Oct 25, 2023
1 parent 1d04388 commit e8952b6
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 26 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/go-fmt.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: golangci-lint
on:
push:
branches:
- main
paths:
- "scai-gen/*"
# Want to trigger these tests whenever the Go CLI or
# APIs are modified
pull_request:
paths:
- "scai-gen/*"
permissions:
contents: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: '1.21.x'
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: golangci-lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc
with:
version: v1.54.2
24 changes: 24 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
linters:
enable:
- asciicheck
- errcheck
- errorlint
- gofmt
- goimports
- gosec
- gocritic
- importas
- prealloc
- revive
- misspell
- stylecheck
- tparallel
- unconvert
- unparam
- unused
- whitespace
output:
uniq-by-line: false
run:
issues-exit-code: 1
timeout: 10m

0 comments on commit e8952b6

Please sign in to comment.