Skip to content

Commit bbde148

Browse files
shogo82148bmoffatt
andauthored
Bump GitHub actions (#605)
* bump GitHub Actions * bump golangci-lint v2.7.1 * fix golangci-lint warnings --------- Co-authored-by: Bryan Moffatt <[email protected]>
1 parent e2b5656 commit bbde148

File tree

22 files changed

+128
-118
lines changed

22 files changed

+128
-118
lines changed

.github/workflows/build-lambda-zip.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
platform: [ubuntu-latest, macos-latest, windows-latest]
1717
steps:
1818
- name: Setup Go
19-
uses: actions/setup-go@v3
19+
uses: actions/setup-go@v6
2020
with:
2121
go-version: ${{ matrix.go-version }}
2222

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v3
41+
uses: actions/checkout@v6
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
45+
uses: github/codeql-action/init@v4
4646
with:
4747
languages: ${{ matrix.language }}
4848
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -53,7 +53,7 @@ jobs:
5353
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5454
# If this step fails, then you should remove it and run the build manually (see below)
5555
- name: Autobuild
56-
uses: github/codeql-action/autobuild@v2
56+
uses: github/codeql-action/autobuild@v4
5757

5858
# ℹ️ Command-line programs to run using the OS shell.
5959
# 📚 https://git.io/JvXDl
@@ -67,4 +67,4 @@ jobs:
6767
# make release
6868

6969
- name: Perform CodeQL Analysis
70-
uses: github/codeql-action/analyze@v2
70+
uses: github/codeql-action/analyze@v4

.github/workflows/lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
name: run golangci-golint on the project
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v4
20-
- uses: actions/setup-go@v5
19+
- uses: actions/checkout@v6
20+
- uses: actions/setup-go@v6
2121
with:
2222
go-version: 'stable'
2323
- name: golangci-golint
24-
uses: golangci/golangci-lint-action@v6
24+
uses: golangci/golangci-lint-action@v9
2525
with:
26-
version: v1.64.5
26+
version: v2.7.1

.github/workflows/tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: Set up Go ${{ matrix.go }}
30-
uses: actions/setup-go@v3
30+
uses: actions/setup-go@v6
3131
with:
3232
go-version: ${{ matrix.go }}
3333

@@ -38,7 +38,7 @@ jobs:
3838
- run: chmod +x /usr/local/bin/aws-lambda-rie
3939

4040
- name: Check out code into the Go module directory
41-
uses: actions/checkout@v3
41+
uses: actions/checkout@v6
4242

4343
- name: Edit the go.mod file to allow tests to run for versions of go before 1.16
4444
run: >
@@ -60,7 +60,7 @@ jobs:
6060
- "1.25"
6161
steps:
6262
- name: Set up Go ${{ matrix.go }}
63-
uses: actions/setup-go@v3
63+
uses: actions/setup-go@v6
6464
with:
6565
go-version: ${{ matrix.go }}
6666

@@ -69,15 +69,15 @@ jobs:
6969
- run: chmod +x /usr/local/bin/aws-lambda-rie
7070

7171
- name: Check out code into the Go module directory
72-
uses: actions/checkout@v3
72+
uses: actions/checkout@v6
7373

7474
- name: go test
7575
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
7676

7777
- name: Upload coverage to Codecov
78-
uses: codecov/codecov-action@v3
78+
uses: codecov/codecov-action@v5
7979
with:
80-
file: ./coverage.txt
80+
files: ./coverage.txt
8181
env_vars: GO
8282
env:
8383
GO: ${{ matrix.go }}

.golangci.yml

Lines changed: 78 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,85 @@
1+
version: "2"
12
linters:
2-
disable-all: true
3+
default: none
34
enable:
4-
- gofmt
55
- errcheck
6-
- gosimple
76
- govet
87
- ineffassign
98
- staticcheck
10-
- typecheck
119
- unused
12-
- stylecheck
13-
14-
issues:
15-
exclude-dirs:
16-
# These were code-generated, and cannot be changed without breaking RPC compatibility.
17-
- lambda/messages
18-
19-
linters-settings:
20-
staticcheck:
21-
checks:
22-
- all
23-
- '-SA1029'
24-
stylecheck:
25-
checks:
26-
- "all"
27-
initialisms:
28-
- "ACL"
29-
- "AMQP"
30-
- "API"
31-
- "ARN"
32-
- "ASCII"
33-
- "AWS"
34-
- "CPU"
35-
- "CSS"
36-
- "DB"
37-
- "DNS"
38-
- "EOF"
39-
- "GID"
40-
- "GUID"
41-
- "HTML"
42-
- "HTTP"
43-
- "HTTPS"
44-
- "IAM"
45-
- "ID"
46-
- "IP"
47-
- "JSON"
48-
- "MQTT"
49-
- "OTF"
50-
- "QPS"
51-
- "RAM"
52-
- "RPC"
53-
- "RTP"
54-
- "SIP"
55-
- "SLA"
56-
- "SMTP"
57-
- "SQL"
58-
- "SSH"
59-
- "TCP"
60-
- "TLS"
61-
- "TS"
62-
- "TTL"
63-
- "UDP"
64-
- "UI"
65-
- "UID"
66-
- "URI"
67-
- "URL"
68-
- "UTF8"
69-
- "UUID"
70-
- "VM"
71-
- "VPC"
72-
- "XML"
73-
- "XMPP"
74-
- "XSRF"
75-
- "XSS"
10+
settings:
11+
staticcheck:
12+
checks:
13+
- all
14+
- -SA1029
15+
initialisms:
16+
- ACL
17+
- AMQP
18+
- API
19+
- ARN
20+
- ASCII
21+
- AWS
22+
- CPU
23+
- CSS
24+
- DB
25+
- DNS
26+
- EOF
27+
- GID
28+
- GUID
29+
- HTML
30+
- HTTP
31+
- HTTPS
32+
- IAM
33+
- ID
34+
- IP
35+
- JSON
36+
- MQTT
37+
- OTF
38+
- QPS
39+
- RAM
40+
- RPC
41+
- RTP
42+
- SIP
43+
- SLA
44+
- SMTP
45+
- SQL
46+
- SSH
47+
- TCP
48+
- TLS
49+
- TS
50+
- TTL
51+
- UDP
52+
- UI
53+
- UID
54+
- URI
55+
- URL
56+
- UTF8
57+
- UUID
58+
- VM
59+
- VPC
60+
- XML
61+
- XMPP
62+
- XSRF
63+
- XSS
64+
exclusions:
65+
generated: lax
66+
presets:
67+
- comments
68+
- common-false-positives
69+
- legacy
70+
- std-error-handling
71+
paths:
72+
- lambda/messages
73+
- third_party$
74+
- builtin$
75+
- examples$
76+
formatters:
77+
enable:
78+
- gofmt
79+
exclusions:
80+
generated: lax
81+
paths:
82+
- lambda/messages
83+
- third_party$
84+
- builtin$
85+
- examples$

events/alb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type ALBTargetGroupRequestContext struct {
2020

2121
// ELBContext contains the information to identify the ARN invoking the lambda
2222
type ELBContext struct {
23-
TargetGroupArn string `json:"targetGroupArn"` //nolint: stylecheck
23+
TargetGroupArn string `json:"targetGroupArn"` //nolint: staticcheck
2424
}
2525

2626
// ALBTargetGroupResponse configures the response to be returned by the ALB Lambda target group for the request

events/apigw.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ type APIGatewayRequestIdentity struct {
208208
SourceIP string `json:"sourceIp"`
209209
CognitoAuthenticationType string `json:"cognitoAuthenticationType,omitempty"`
210210
CognitoAuthenticationProvider string `json:"cognitoAuthenticationProvider,omitempty"`
211-
UserArn string `json:"userArn,omitempty"` //nolint: stylecheck
211+
UserArn string `json:"userArn,omitempty"` //nolint: staticcheck
212212
UserAgent string `json:"userAgent"`
213213
User string `json:"user,omitempty"`
214214
ClientCert *APIGatewayCustomAuthorizerRequestTypeRequestIdentityClientCert `json:"clientCert,omitempty"`
@@ -317,7 +317,7 @@ type APIGatewayV2CustomAuthorizerV1RequestTypeRequestContext struct {
317317
type APIGatewayV2CustomAuthorizerV1Request struct {
318318
Version string `json:"version"`
319319
Type string `json:"type"`
320-
MethodArn string `json:"methodArn"` //nolint: stylecheck
320+
MethodArn string `json:"methodArn"` //nolint: staticcheck
321321
IdentitySource string `json:"identitySource"`
322322
AuthorizationToken string `json:"authorizationToken"`
323323
Resource string `json:"resource"`
@@ -333,7 +333,7 @@ type APIGatewayV2CustomAuthorizerV1Request struct {
333333
type APIGatewayV2CustomAuthorizerV2Request struct {
334334
Version string `json:"version"`
335335
Type string `json:"type"`
336-
RouteArn string `json:"routeArn"` //nolint: stylecheck
336+
RouteArn string `json:"routeArn"` //nolint: staticcheck
337337
IdentitySource []string `json:"identitySource"`
338338
RouteKey string `json:"routeKey"`
339339
RawPath string `json:"rawPath"`
@@ -372,13 +372,13 @@ type APIGatewayCustomAuthorizerRequestTypeRequestContext struct {
372372
type APIGatewayCustomAuthorizerRequest struct {
373373
Type string `json:"type"`
374374
AuthorizationToken string `json:"authorizationToken"`
375-
MethodArn string `json:"methodArn"` //nolint: stylecheck
375+
MethodArn string `json:"methodArn"` //nolint: staticcheck
376376
}
377377

378378
// APIGatewayCustomAuthorizerRequestTypeRequest contains data coming in to a custom API Gateway authorizer function.
379379
type APIGatewayCustomAuthorizerRequestTypeRequest struct {
380380
Type string `json:"type"`
381-
MethodArn string `json:"methodArn"` //nolint: stylecheck
381+
MethodArn string `json:"methodArn"` //nolint: staticcheck
382382
Resource string `json:"resource"`
383383
Path string `json:"path"`
384384
HTTPMethod string `json:"httpMethod"`

events/attributevalue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type DynamoDBAttributeValue struct {
2020

2121
// This struct represents DynamoDBAttributeValue which doesn't
2222
// implement fmt.Stringer interface and safely `fmt.Sprintf`able
23-
type dynamoDbAttributeValue DynamoDBAttributeValue //nolint: stylecheck
23+
type dynamoDbAttributeValue DynamoDBAttributeValue //nolint: staticcheck
2424

2525
// Binary provides access to an attribute of type Binary.
2626
// Method panics if the attribute is not of type Binary.

events/code_commit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ type CodeCommitRecord struct {
5252
EventPartNumber uint64 `json:"eventPartNumber"`
5353
CodeCommit CodeCommitCodeCommit `json:"codecommit"`
5454
EventName string `json:"eventName"`
55-
EventTriggerConfigId string `json:"eventTriggerConfigId"` //nolint: stylecheck
55+
EventTriggerConfigId string `json:"eventTriggerConfigId"` //nolint: staticcheck
5656
EventSourceARN string `json:"eventSourceARN"`
5757
UserIdentityARN string `json:"userIdentityARN"`
5858
EventSource string `json:"eventSource"`

events/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ type ConfigEvent struct {
77
// The ID of the AWS account that owns the rule
88
AccountID string `json:"accountId"`
99
// The ARN that AWS Config assigned to the rule
10-
ConfigRuleArn string `json:"configRuleArn"` //nolint:stylecheck
11-
ConfigRuleID string `json:"configRuleId"` //nolint:stylecheck
10+
ConfigRuleArn string `json:"configRuleArn"` //nolint:staticcheck
11+
ConfigRuleID string `json:"configRuleId"` //nolint:staticcheck
1212
// The name that you assigned to the rule that caused AWS Config to publish the event
1313
ConfigRuleName string `json:"configRuleName"`
1414
// A boolean value that indicates whether the AWS resource to be evaluated has been removed from the rule's scope
1515
EventLeftScope bool `json:"eventLeftScope"`
16-
ExecutionRoleArn string `json:"executionRoleArn"` //nolint:stylecheck
16+
ExecutionRoleArn string `json:"executionRoleArn"` //nolint:staticcheck
1717
// If the event is published in response to a resource configuration change, this value contains a JSON configuration item
1818
InvokingEvent string `json:"invokingEvent"`
1919
// A token that the function must pass to AWS Config with the PutEvaluations call

0 commit comments

Comments
 (0)