Skip to content

Commit a2c14c6

Browse files
committed
ci: add golangci-lint
1 parent 07bba9d commit a2c14c6

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.github/workflows/releaser.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@ permissions:
1010
packages: write
1111

1212
jobs:
13+
lint:
14+
name: Lint
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
-
19+
name: Set up Go
20+
uses: actions/setup-go@v5
21+
with:
22+
go-version-file: 'go.mod'
23+
- name: golangci-lint
24+
uses: golangci/golangci-lint-action@v8
25+
with:
26+
only-new-issues: true
27+
1328
releaser:
1429
name: Release
1530
runs-on: ubuntu-latest

.golangci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: "2"
2+
3+
run:
4+
issues-exit-code: 1
5+
6+
formatters:
7+
enable:
8+
- gofmt
9+
- gci
10+
11+
linters:
12+
enable:
13+
- wrapcheck
14+
settings:
15+
wrapcheck:
16+
ignore-package-globs:
17+
# We already make sure your own packages wrap errors properly
18+
- github.com/symfony-cli/*
19+
errcheck:
20+
exclude-functions:
21+
- github.com/symfony-cli/terminal.Print
22+
- github.com/symfony-cli/terminal.Printf
23+
- github.com/symfony-cli/terminal.Println
24+
- github.com/symfony-cli/terminal.Printfln
25+
- github.com/symfony-cli/terminal.Eprint
26+
- github.com/symfony-cli/terminal.Eprintf
27+
- github.com/symfony-cli/terminal.Eprintln
28+
- github.com/symfony-cli/terminal.Eprintfln
29+
- github.com/symfony-cli/terminal.Eprint
30+
- fmt.Fprintln
31+
- fmt.Fprintf
32+
- fmt.Fprint

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy