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

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Lint
on:
push:
branches:
- master
pull_request:
branches:
- master

permissions:
contents: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: stable

- name: golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.1
# Show only new issues until the entire repository
# is compliant with the new linting rules.
only-new-issues: true
23 changes: 23 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Configuration of formatting and linting using https://golangci-lint.run/.
version: "2"

linters:
default: none
enable:
- errcheck
- govet
- ineffassign
- staticcheck
- unused

formatters:
enable:
- gofmt
- goimports

issues:
# Show only new issues created after the introduction of the linter.
new-from-rev: ea5ac7e13561f6334938261321e13a725d1c0180

# Show issues in any part of update files (requires new-from-rev or new-from-patch).
whole-files: true
Loading