-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakefile
More file actions
34 lines (32 loc) · 797 Bytes
/
Copy pathmakefile
File metadata and controls
34 lines (32 loc) · 797 Bytes
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
install:
make install-dependencies
make install-hooks
install-dependencies:
go install github.com/securego/gosec/v2/cmd/gosec@latest
go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest
install-hooks:
cp .setup/build/config/pre-commit .git/hooks &&\
chmod +x .git/hooks/pre-commit
docker-build:
docker compose build
build:
go build -o bin/gowatch cmd/gowatch/main.go
run:
./bin/gowatch
clean:
rm -rf bin/
go-sec:
gosec ./...
field-fix:
fieldalignment -fix ./...
## TEST
#COVER_DIRS=./internal/usecases/...
COVER_DIRS=./...
test:
make test-command
go tool cover -func=coverage.out
test-coverage:
make test-command
go tool cover -html=coverage.out
test-command:
go test -race -coverpkg=$(COVER_DIRS) -v -coverprofile=coverage.out $(COVER_DIRS)