File tree Expand file tree Collapse file tree 6 files changed +88
-82
lines changed Expand file tree Collapse file tree 6 files changed +88
-82
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ RUN sudo pacman -Syu --noconfirm pacman-contrib fish git-delta openssh bat go
7
7
# Set passwordless sudo for the docker user
8
8
RUN echo "docker ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/docker
9
9
10
+ # Add /app/bin to the PATH
11
+ ENV PATH="/app/bin:$PATH"
12
+
10
13
# Create a non-root user and switch to it
11
14
USER docker
12
15
Original file line number Diff line number Diff line change 1
- linters-settings :
2
- dupl :
3
- threshold : 100
4
- funlen :
5
- lines : 100
6
- statements : 50
7
- goconst :
8
- min-len : 3
9
- min-occurrences : 4
10
- gocritic :
11
- enabled-tags :
12
- - diagnostic
13
- - experimental
14
- - opinionated
15
- - performance
16
- - style
17
- gocyclo :
18
- min-complexity : 15
19
- goimports :
20
- local-prefixes : github.com/Jguer/yay/v12
21
- gomnd :
22
- checks :
23
- - argument
24
- - case
25
- - condition
26
- - return
27
- ignored-numbers :
28
- - " 0"
29
- - " 1"
30
- - " 2"
31
- - " 3"
32
- ignored-functions :
33
- - strings.SplitN
34
- lll :
35
- line-length : 140
36
- misspell :
37
- locale : US
38
- nolintlint :
39
- allow-unused : false # report any unused nolint directives
40
- require-explanation : false # don't require an explanation for nolint directives
41
- require-specific : false # don't require nolint directives to be specific about which linter is being skipped
42
-
1
+ version : " 2"
2
+ run :
3
+ go : " 1.22"
43
4
linters :
44
- # please, do not use `enable-all`: it's deprecated and will be removed soon.
45
- # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
46
- disable-all : true
5
+ default : none
47
6
enable :
48
- - forbidigo
49
7
- bodyclose
8
+ - copyloopvar
50
9
- dogsled
51
10
- dupl
52
- - errorlint
53
11
- errcheck
54
- - copyloopvar
55
- # - funlen # TOFIX
12
+ - errorlint
13
+ - forbidigo
56
14
- gochecknoinits
57
- # - goconst # TOFIX
58
- # - gocritic
59
- # - gocyclo # TOFIX
60
- - gofmt
61
- - goimports
62
- # - gomnd # TOFIX
63
15
- goprintffuncname
64
16
- gosec
65
- - gosimple
66
17
- govet
67
18
- ineffassign
68
19
- lll
@@ -71,32 +22,75 @@ linters:
71
22
- noctx
72
23
- nolintlint
73
24
- staticcheck
74
- - stylecheck
75
- - typecheck
76
25
- unconvert
77
26
- unparam
78
27
- unused
79
28
- whitespace
80
-
81
- run :
82
- go : " 1.22"
83
- timeout : " 10m"
84
-
85
- issues :
86
- exclude-rules :
87
- - path : (.+)_test.go
88
- linters :
89
- - lll
90
- - revive
91
- - wsl
92
- - govet
93
- - godot
94
- - errcheck
95
- - stylecheck
96
- - dupl
97
- - gocritic
98
- - gochecknoinits
99
- - errorlint
100
-
101
- exclude :
102
- - G204
29
+ - revive
30
+ settings :
31
+ dupl :
32
+ threshold : 100
33
+ funlen :
34
+ lines : 100
35
+ statements : 50
36
+ goconst :
37
+ min-len : 3
38
+ min-occurrences : 4
39
+ gocritic :
40
+ enabled-tags :
41
+ - diagnostic
42
+ - experimental
43
+ - opinionated
44
+ - performance
45
+ - style
46
+ gocyclo :
47
+ min-complexity : 15
48
+ lll :
49
+ line-length : 140
50
+ misspell :
51
+ locale : US
52
+ nolintlint :
53
+ require-explanation : false
54
+ require-specific : false
55
+ allow-unused : false
56
+ exclusions :
57
+ generated : lax
58
+ presets :
59
+ - comments
60
+ - common-false-positives
61
+ - legacy
62
+ - std-error-handling
63
+ rules :
64
+ - linters :
65
+ - dupl
66
+ - errcheck
67
+ - errorlint
68
+ - gochecknoinits
69
+ - gocritic
70
+ - godot
71
+ - govet
72
+ - lll
73
+ - revive
74
+ - staticcheck
75
+ - wsl
76
+ path : (.+)_test.go
77
+ - path : (.+)\.go$
78
+ text : G204
79
+ paths :
80
+ - third_party$
81
+ - builtin$
82
+ - examples$
83
+ formatters :
84
+ enable :
85
+ - gofmt
86
+ - goimports
87
+ settings :
88
+ goimports :
89
+ local-prefixes :
90
+ - github.com/Jguer/go-alpm/v2
91
+ exclusions :
92
+ generated : lax
93
+ paths :
94
+ - third_party$
95
+ - builtin$
96
+ - examples$
Original file line number Diff line number Diff line change
1
+ {
2
+ "go.lintTool" : " golangci-lint" ,
3
+ "gopls" : {
4
+ "formatting.gofumpt" : true ,
5
+ "formatting.local" : " github.com/Jguer/go-alpm/v2"
6
+ }
7
+ }
Original file line number Diff line number Diff line change 30
30
questionCallbackContextPool = callbackContextPool {}
31
31
)
32
32
33
- func DefaultLogCallback (ctx interface {}, lvl LogLevel , s string ) {
33
+ func DefaultLogCallback (_ interface {}, lvl LogLevel , s string ) {
34
34
if lvl <= DefaultLogLevel {
35
35
fmt .Fprintln (os .Stdout , "go-alpm: " , s )
36
36
}
Original file line number Diff line number Diff line change 4
4
"testing"
5
5
6
6
alpm "github.com/Jguer/go-alpm/v2"
7
+
7
8
"github.com/stretchr/testify/require"
8
9
)
9
10
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import (
13
13
"time"
14
14
15
15
alpm "github.com/Jguer/go-alpm/v2"
16
+
16
17
"github.com/stretchr/testify/assert"
17
18
)
18
19
You can’t perform that action at this time.
0 commit comments