aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2025-05-23 11:01:23 +0700
committerShulhan <ms@kilabit.info>2025-05-27 01:51:35 +0700
commitbcccb3d65bf1714bb03ef6342a85fe14e6209c51 (patch)
tree4dfe3fd89737751228a13a712897b6bc07cd2d68 /Makefile
parent25c19699c84bdf77244edd1dda73652ac57376a6 (diff)
downloadjarink-bcccb3d65bf1714bb03ef6342a85fe14e6209c51.tar.xz
all: complete the first minimum working implementation
The current implementation at least cover 84% of the cases. Todo, * CLI for scan * add more test case for 100% coverage, including scan on invalid base URL, scan on invalid HTML page, scan on invalid href or src image
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e6d24fa..3699644 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,9 @@
## SPDX-FileCopyrightText: 2025 M. Shulhan <ms@kilabit.info>
## SPDX-License-Identifier: GPL-3.0-only
+COVER_OUT:=cover.out
+COVER_HTML:=cover.html
+
.PHONY: all
all: lint test
@@ -11,4 +14,6 @@ lint:
.PHONY: test
test:
- go test ./...
+ CGO_ENABLED=1 go test -failfast -timeout=1m -race \
+ -coverprofile=$(COVER_OUT) ./...
+ go tool cover -html=$(COVER_OUT) -o $(COVER_HTML)