-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
44 lines (29 loc) · 1.2 KB
/
Makefile
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
# Copyright (c) Juniper Networks, Inc., 2022-2024.
# All rights reserved.
# SPDX-License-Identifier: Apache-2.0
all: compliance-check license-header-check verify unit-tests integration-tests
check-repo-clean:
git update-index --refresh && git diff-index --quiet HEAD --
compliance:
go run github.com/chrismarget-j/go-licenses save --ignore github.com/Juniper --save_path Third_Party_Code --force ./... || exit 1 ;\
go run github.com/chrismarget-j/go-licenses report --ignore github.com/Juniper --template .notices.tpl ./... > Third_Party_Code/NOTICES.md || exit 1 ;\
compliance-check: compliance check-repo-clean
license-header-check:
@sh -c "$(CURDIR)/.ci/scripts/license_header_check.sh"
fast-check: verify unit-tests
unit-tests:
go test -v .
integration-tests:
go test -tags integration -v .
verify: lint-revive lint-staticcheck fmt-check vet
fmt-check:
@sh -c "$(CURDIR)/.ci/scripts/gofmt_check.sh"
fumpt-check:
@sh -c "$(CURDIR)/.ci/scripts/gofumpt_check.sh"
lint-revive:
revive -set_exit_status -config revive.toml .
lint-staticcheck:
staticcheck -tags integration .
vet:
go vet -v ./apstra/...
.PHONY: all fmt-check license-header-check lint lint-revive lint-staticcheck unit-tests verify vet