Skip to content

Commit 4c44160

Browse files
committed
feat: devcontainer
Signed-off-by: thediveo <[email protected]>
1 parent f0841ab commit 4c44160

File tree

7 files changed

+47
-138
lines changed

7 files changed

+47
-138
lines changed

.devcontainer/devcontainer.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "fdooze",
3+
"portsAttributes": {
4+
"6060": {
5+
"label": "fdooze package documentation",
6+
"onAutoForward": "notify",
7+
"protocol": "http"
8+
}
9+
},
10+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
11+
"features": {
12+
"ghcr.io/thediveo/devcontainer-features/local-pkgsite:0": {},
13+
"ghcr.io/thediveo/devcontainer-features/goreportcard:0": {},
14+
"ghcr.io/thediveo/devcontainer-features/go-mod-upgrade:0": {},
15+
"ghcr.io/thediveo/devcontainer-features/gocover:0": {
16+
"num-programs": "1",
17+
"race": true,
18+
"verbose": true,
19+
"html": true
20+
},
21+
"ghcr.io/thediveo/devcontainer-features/pin-github-action:0": {}
22+
},
23+
"remoteEnv": {
24+
"GOPATH": "/home/vscode/go",
25+
"PATH": "/home/vscode/go/bin:/go/bin:/usr/local/go/bin:${localEnv:PATH}"
26+
},
27+
"customizations": {
28+
"vscode": {
29+
"extensions": [
30+
"stkb.rewrap",
31+
"brunnerh.insert-unicode",
32+
"mhutchie.git-graph",
33+
"ms-vscode.makefile-tools"
34+
]
35+
}
36+
}
37+
}

Makefile

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
1-
.PHONY: help chores clean coverage pkgsite report test vuln
1+
.PHONY: help clean coverage report test
22

33
help: ## list available targets
44
@# Shamelessly stolen from Gomega's Makefile
55
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-16s\033[0m %s\n", $$1, $$2}'
66

77
clean: ## cleans up build and testing artefacts
8-
rm -f coverage.html coverage.out coverage.txt
8+
rm -f coverage.*
99

10-
coverage: ## gathers coverage and updates README badge
11-
@scripts/cov.sh
12-
13-
pkgsite: ## serves Go documentation on port 6060
14-
@echo "navigate to: http://localhost:6060/github.com/thediveo/fdooze"
15-
@scripts/pkgsite.sh
16-
17-
report: ## runs goreportcard on this module
18-
@scripts/goreportcard.sh
10+
test: ## run unit tests
11+
go test -v -p=1 -race ./...
1912

20-
test: ## runs unit tests
21-
go test -v -p=1 -count=1 -race ./...
13+
report: ## run goreportcard-cli on this module
14+
# from ghcr.io/thediveo/devcontainer-features/goreportcard
15+
goreportcard-cli -v ./..
2216

23-
vuln: ## runs govulncheck
24-
@scripts/vuln.sh
25-
26-
chores: ## updates Go binaries and NPM helper packages if necessary
27-
@scripts/chores.sh
17+
coverage: ## gathers coverage and updates README badge
18+
# from ghcr.io/thediveo/devcontainer-features/gocover
19+
gocover

scripts/chores.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

scripts/cov.sh

Lines changed: 0 additions & 33 deletions
This file was deleted.

scripts/goreportcard.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

scripts/pkgsite.sh

Lines changed: 0 additions & 29 deletions
This file was deleted.

scripts/vuln.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)