Skip to content

Commit

Permalink
add golangci-lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoisaiah committed Oct 5, 2024
1 parent d6b0972 commit caf1007
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint code
on:
push:
branches:
- master
pull_request:

permissions:
contents: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.23
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ linters:
- decorder
- containedctx
- contextcheck
- copyloopvar
- dogsled
- dupl
- errcheck
- errchkjson
- errname
- errorlint
- exportloopref
- exhaustive
- goconst
- godot
Expand Down Expand Up @@ -47,6 +47,7 @@ linters:
- usestdlibvars
- unparam
- unused
- wastedassign
- whitespace
- wsl

Expand Down

0 comments on commit caf1007

Please sign in to comment.