mirror of
https://github.com/tuneinsight/lattigo.git
synced 2025-09-13 03:27:14 +00:00
Initial commit
This commit is contained in:
34
Makefile
Normal file
34
Makefile
Normal file
@@ -0,0 +1,34 @@
|
||||
EXCLUDE_LINT = "_test.go"
|
||||
|
||||
test_fmt:
|
||||
@echo Checking correct formatting of files
|
||||
@{ \
|
||||
files=$$( go fmt ./... ); \
|
||||
if [ -n "$$files" ]; then \
|
||||
echo "Files not properly formatted: $$files"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if ! go vet ./...; then \
|
||||
exit 1; \
|
||||
fi \
|
||||
}
|
||||
|
||||
test_lint:
|
||||
@echo Checking linting of files
|
||||
@{ \
|
||||
go install golang.org/x/lint/golint; \
|
||||
el=$(EXCLUDE_LINT); \
|
||||
lintfiles=$$( golint ./... | egrep -v "$$el" ); \
|
||||
if [ -n "$$lintfiles" ]; then \
|
||||
echo "Lint errors:"; \
|
||||
echo "$$lintfiles"; \
|
||||
exit 1; \
|
||||
fi \
|
||||
}
|
||||
|
||||
test_local:
|
||||
go test -v -race -short -p=1 ./...
|
||||
|
||||
test: test_fmt test_local
|
||||
|
||||
local: test_fmt test_lint test_local
|
||||
Reference in New Issue
Block a user