Skip to content

Commit f61bba1

Browse files
authored
add golangci config in examples (#237)
1 parent 8ebcb0c commit f61bba1

File tree

6 files changed

+52
-7
lines changed

6 files changed

+52
-7
lines changed

_examples/.golangci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Configuration for golangci-lint for scion-apps.
2+
# See https://github.com/golangci/golangci-lint#config-file
3+
4+
linters:
5+
enable:
6+
# enabled by default:
7+
#- deadcode
8+
#- errcheck
9+
#- gosimple
10+
#- govet
11+
#- ineffassign
12+
#- staticcheck
13+
#- structcheck
14+
#- typecheck
15+
#- unused
16+
#- varcheck
17+
- asciicheck
18+
- bidichk
19+
- contextcheck
20+
- dupl
21+
- durationcheck
22+
- errname
23+
- errorlint
24+
- exportloopref
25+
- gci
26+
- gofmt
27+
- ifshort
28+
- importas
29+
- makezero
30+
- misspell
31+
- nilerr
32+
- nilnil
33+
- nolintlint
34+
- prealloc
35+
- stylecheck
36+
- thelper
37+
- wastedassign
38+
- tenv
39+
40+
issues:
41+
max-same-issues: 0
42+
43+
linters-settings:
44+
gci:
45+
local-prefixes: examples
46+
exhaustive:
47+
default-signifies-exhaustive: true
48+
49+
run:
50+
build-tags: integration

_examples/helloquic/helloquic.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ import (
2525
"time"
2626

2727
"github.com/lucas-clemente/quic-go"
28-
"inet.af/netaddr"
29-
3028
"github.com/netsec-ethz/scion-apps/pkg/pan"
3129
"github.com/netsec-ethz/scion-apps/pkg/quicutil"
30+
"inet.af/netaddr"
3231
)
3332

3433
func main() {

_examples/helloworld/helloworld.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ import (
2222
"os"
2323
"time"
2424

25-
"inet.af/netaddr"
26-
2725
"github.com/netsec-ethz/scion-apps/pkg/pan"
26+
"inet.af/netaddr"
2827
)
2928

3029
func main() {

_examples/shttp/fileserver/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import (
2323
"os"
2424

2525
"github.com/gorilla/handlers"
26-
2726
"github.com/netsec-ethz/scion-apps/pkg/shttp"
2827
)
2928

_examples/shttp/proxy/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"os"
1111

1212
"github.com/gorilla/handlers"
13-
1413
"github.com/netsec-ethz/scion-apps/pkg/shttp"
1514
)
1615

_examples/shttp/server/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
"time"
2525

2626
"github.com/gorilla/handlers"
27-
2827
"github.com/netsec-ethz/scion-apps/pkg/shttp"
2928
)
3029

0 commit comments

Comments
 (0)