File tree 5 files changed +62
-65
lines changed
5 files changed +62
-65
lines changed Original file line number Diff line number Diff line change 1
1
linters-settings :
2
- govet :
3
- check-shadowing : true
4
- golint :
5
- min-confidence : 0
6
- gocyclo :
7
- min-complexity : 16
8
- maligned :
9
- suggest-new : true
10
- dupl :
11
- threshold : 200
12
- goconst :
13
- min-len : 2
14
- min-occurrences : 2
15
- misspell :
16
- locale : US
17
- lll :
18
- line-length : 140
19
- gocritic :
20
- enabled-tags :
21
- - performance
22
- - style
23
- - experimental
24
- disabled-checks :
25
- - wrapperFunc
26
- - hugeParam
27
- - rangeValCopy
2
+ govet :
3
+ check-shadowing : true
4
+ gocyclo :
5
+ min-complexity : 16
6
+ dupl :
7
+ threshold : 200
8
+ goconst :
9
+ min-len : 2
10
+ min-occurrences : 2
11
+ misspell :
12
+ locale : US
13
+ lll :
14
+ line-length : 140
15
+ gocritic :
16
+ enabled-tags :
17
+ - performance
18
+ - style
19
+ - experimental
20
+ disabled-checks :
21
+ - wrapperFunc
22
+ - hugeParam
23
+ - rangeValCopy
24
+ revive :
25
+ min-confidence : 0
28
26
29
27
linters :
30
- disable-all : true
31
- enable :
32
- - deadcode
33
- - dupl
34
- - gas
35
- - gocritic
36
- - gocyclo
37
- - golint
38
- - gosimple
39
- - govet
40
- - ineffassign
41
- - maligned
42
- - megacheck
43
- - misspell
44
- - nakedret
45
- - prealloc
46
- - scopelint
47
- - structcheck
48
- - stylecheck
49
- - typecheck
50
- - unconvert
51
- - unparam
52
- - varcheck
53
- fast : false
28
+ disable-all : true
29
+ enable :
30
+ - unused
31
+ - dupl
32
+ - gosec
33
+ # - gocritic # Temporarily disabled due to compatibility issues with Go 1.24
34
+ - gocyclo
35
+ - revive
36
+ - gosimple
37
+ - govet
38
+ - ineffassign
39
+ - staticcheck
40
+ - misspell
41
+ - nakedret
42
+ - prealloc
43
+ - exportloopref
44
+ - stylecheck
45
+ - typecheck
46
+ - unconvert
47
+ - unparam
48
+ fast : false
54
49
55
50
run :
56
- skip-dirs :
57
- - vendor
58
- concurrency : 4
51
+ skip-dirs :
52
+ - vendor
53
+ concurrency : 4
59
54
60
55
issues :
61
- exclude-rules :
62
- - text : " weak cryptographic primitive"
63
- linters :
64
- - gosec
65
- exclude-use-default : false
56
+ exclude-rules :
57
+ - text : " weak cryptographic primitive"
58
+ linters :
59
+ - gosec
60
+ exclude-use-default : false
66
61
67
62
service :
68
- golangci-lint-version : 1.54 .2
63
+ golangci-lint-version : 1.64 .2
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ build: $(TARGET) check-go ## builds and installs binary in bin/
36
36
37
37
check-go :
38
38
ifndef GOPATH
39
- $(error "go is not available please install golang version 1.21 .0+, https://golang.org/dl/")
39
+ $(error "go is not available please install golang version 1.24 .0+, https://golang.org/dl/")
40
40
endif
41
41
42
42
clean : check-go # # runs `go clean` and removes the bin/ dir
@@ -50,9 +50,11 @@ cover-html: cover ## generates test coverage html report
50
50
$(GOCMD ) tool cover -html=$(COVER_FILE )
51
51
52
52
setup : check-go # # installs all dev and ci dependencies, but does not install golang
53
- # # "go get" won't work for newer go versions, need to use "go install github.com/rakyll/statik"
53
+ # # Install golangci-lint
54
+ # # golangci-lint is not yet fully supporting gl v1.24, need to wait a bit. Should work after some time
55
+ # # skip linting until then
54
56
ifeq (,$(wildcard $(GOLINT ) ) )
55
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(GOPATH)/bin v1.54 .2
57
+ curl -sSfL https ://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH ) /bin v1.64 .2
56
58
endif
57
59
# # "go get" won't work for newer go versions, need to use "go install github.com/rakyll/statik"
58
60
ifeq (,$(wildcard $(GOPATH ) /bin/statik) )
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ Refer to the [Agent's developer documentation](https://docs.developers.optimizel
15
15
16
16
### Requirements
17
17
18
- Optimizely Agent is implemented in [ Golang] ( https://golang.org/ ) . Golang version 1.21 .0+ is required for developing and compiling from source.
18
+ Optimizely Agent is implemented in [ Golang] ( https://golang.org/ ) . Golang version 1.24 .0+ is required for developing and compiling from source.
19
19
Installers and binary archives for most platforms can be downloaded directly from the Go [ downloads] ( https://go.dev/dl/ ) page.
20
20
21
21
### Run from source (Linux / OSX)
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ function main($mode) {
102
102
# noninteractive mode: ./build.ps1 noninteractive (default: interactive)
103
103
104
104
# check if go is installed, if not, install it.
105
- checkPrereq ' Go Programming Language amd64 go1.20.1' https:// dl.google.com / go/ go1.20.1 .windows- amd64.msi f06fdfa56f3aba62cbf80dacddbcc1150f4990cc117a9477047d3a3529ee3e80 $mode
105
+ checkPrereq ' Go Programming Language amd64 go1.20.1' https:// dl.google.com / go/ go1.24.0 .windows- amd64.msi f06fdfa56f3aba62cbf80dacddbcc1150f4990cc117a9477047d3a3529ee3e80 $mode
106
106
# same but with git
107
107
checkPrereq ' Git version 2.39.2' https:// github.com / git- for- windows/ git/ releases/ download/ v2.39.2 .windows.1 / Git-2.39.2-64-bit.exe d7608fbd854b3689102ff48b03c8cc77b35138f9f7350d134306da0ba5751464 $mode
108
108
Original file line number Diff line number Diff line change 1
1
ARG GO_VERSION
2
2
FROM golang:$GO_VERSION-alpine3.21 as builder
3
- # hadolint ignore=DL3018 - test comment
3
+ # hadolint ignore=DL3018
4
4
RUN addgroup -S agentgroup && adduser -S agentuser -G agentgroup
5
5
RUN apk add --no-cache make gcc libc-dev git curl
6
6
WORKDIR /go/src/github.com/optimizely/agent
You can’t perform that action at this time.
0 commit comments