Skip to content

Commit e9e6c40

Browse files
committed
Some updates
- chore: using tools through docker for less dependency - chore: support Go 1.20.
1 parent e7d3683 commit e9e6c40

File tree

8 files changed

+34
-21
lines changed

8 files changed

+34
-21
lines changed

.github/workflows/check-code.yaml

+2-8
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
- uses: "actions/setup-go@v3"
3434
with:
35-
go-version: "1.19"
35+
go-version: "1.20"
3636

3737
- name: "Write go.list file"
3838
run: "go list -buildvcs=false -deps -json ./... > go.list"
@@ -46,13 +46,6 @@ jobs:
4646
steps:
4747
- uses: "actions/checkout@v3"
4848

49-
- uses: "actions/setup-node@v3"
50-
with:
51-
node-version: "16.x"
52-
53-
- name: "Install cSpell"
54-
run: "npm install -g cspell"
55-
5649
- name: "Run spell check"
5750
run: "make spell-check"
5851

@@ -67,6 +60,7 @@ jobs:
6760
- "1.17"
6861
- "1.18"
6962
- "1.19"
63+
- "1.20"
7064
steps:
7165
- uses: "actions/checkout@v3"
7266

.github/workflows/scan-vulnerabilities.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
- uses: "actions/setup-go@v3"
2020
with:
21-
go-version: "1.19"
21+
go-version: "1.20"
2222

2323
- name: "Write go.list file"
2424
run: "go list -buildvcs=false -deps -json ./... > go.list"

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.cache

.golangci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ linters-settings:
4141
nestif:
4242
min-complexity: 4
4343
staticcheck:
44-
go: "1.19"
44+
go: "1.20"
4545
testpackage:
4646
skip-regexp: "_inner_test.go"
4747

.vscode/cspell.json

+9
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22
"caseSensitive": false,
33
"dictionaries": [
44
"bash",
5+
"docker",
56
"golang"
67
],
8+
"enableGlobDot": true,
9+
"ignorePaths": [
10+
".cache",
11+
".git",
12+
"go.mod",
13+
"go.sum"
14+
],
715
"language": "en",
816
"minWordLength": 4,
917
"words": [
@@ -36,6 +44,7 @@
3644
"rowserrcheck",
3745
"scopelint",
3846
"sonatype",
47+
"sonatypecommunity",
3948
"sqlclosecheck",
4049
"staticcheck",
4150
"structcheck",

Makefile

+18-7
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,36 @@ endif
44

55
pkg ?= ./...
66

7+
.PHONY: clean
8+
clean:
9+
rm -rf .cache/*
10+
711
.PHONY: fmt
812
fmt:
913
go fmt $(pkg)
1014

1115
.PHONY: lint
1216
lint:
13-
golangci-lint run $(pkg)
17+
docker pull golangci/golangci-lint:latest > /dev/null \
18+
&& mkdir -p .cache/golangci-lint \
19+
&& docker run --rm \
20+
-v $(shell pwd):/app \
21+
-v $(shell pwd)/.cache:/root/.cache \
22+
-w /app golangci/golangci-lint:latest golangci-lint run $(pkg)
1423

1524
.PHONY: nancy
1625
nancy:
17-
go list -buildvcs=false -deps -json ./... | nancy sleuth
26+
docker pull sonatypecommunity/nancy:latest > /dev/null \
27+
&& go list -buildvcs=false -deps -json ./... \
28+
| docker run --rm -i sonatypecommunity/nancy:latest sleuth
1829

1930
.PHONY: spell-check
2031
spell-check:
21-
# npm install -g cspell@latest
22-
cspell lint --config .vscode/cspell.json ".*" && \
23-
cspell lint --config .vscode/cspell.json "**/.*" && \
24-
cspell lint --config .vscode/cspell.json ".{github,vscode}/**/*" && \
25-
cspell lint --config .vscode/cspell.json "**"
32+
docker pull ghcr.io/streetsidesoftware/cspell:latest > /dev/null \
33+
&& docker run --rm \
34+
-v $(shell pwd):/workdir \
35+
ghcr.io/streetsidesoftware/cspell:latest \
36+
--config .vscode/cspell.json "**"
2637

2738
.PHONY: test
2839
test:

README.jp.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
## Requirements
2525

2626
- Go 1.16 以上.
27-
28-
- [golangci-lint](https://golangci-lint.run)
27+
- Docker (開発時)
2928

3029
## Install
3130

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ This package is awesome.
2424
## Requirements
2525

2626
- Go 1.16 or above.
27-
28-
- [golangci-lint](https://golangci-lint.run)
27+
- Docker (for Development)
2928

3029
## Install
3130

0 commit comments

Comments
 (0)