-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
46 lines (37 loc) · 958 Bytes
/
Justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
set shell := ["bash", "-u", "-c"]
export scripts := ".github/workflows/scripts"
export GOBIN := `echo $PWD/.bin`
# show available commands
[private]
default:
@just --list
# tidy up Go modules
[group('build')]
tidy:
go mod tidy
# run tests across source tree
[group('build')]
test:
go test -v -race -count=1 ./...
# ensure copywrite headers present on source files
[group('lint')]
copywrite:
copywrite \
--config {{scripts}}/copywrite.hcl headers \
--spdx "BSD-3-Clause"
# apply go vet command on source tree
[group('lint')]
vet:
go vet ./...
# apply golangci-lint linters on source tree
[group('lint')]
lint: vet
$GOBIN/golangci-lint run --config {{scripts}}/golangci.yaml
# show host system information
[group('build')]
@sysinfo:
echo "{{os()/arch()}} {{num_cpus()}}c"
# locally install build dependencies
[group('build')]
init:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2