Skip to content

Commit fc1552e

Browse files
author
HenryAtUber
committed
init check
0 parents  commit fc1552e

File tree

109 files changed

+13644
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+13644
-0
lines changed

.codecov.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
coverage:
2+
status:
3+
patch: false
4+
5+
range: 70..100 # First number represents red, and second represents green
6+
# (default is 70..100)
7+
round: down # up, down, or nearest
8+
precision: 2 # Number of decimal places, between 0 and 5
9+
10+
# Ignoring Paths
11+
# --------------
12+
# which folders/files to ignore
13+
ignore:
14+
- */img/.*
15+
- */examples/.*
16+
- */scripts/.*
17+
- setup.py
18+
- versioneer.py
19+
20+
# Pull request comments:
21+
# ----------------------
22+
# Diff is the Coverage Diff of the pull request.
23+
# Files are the files impacted by the pull request
24+
comment:
25+
layout: diff, files # accepted in any order: reach, diff, flags, and/or files

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
8+
# Test binary, built with `go test -c`
9+
*.test
10+
11+
# Output of the go coverage tool, specifically when used with LiteIDE
12+
*.out
13+
14+
# Dependency directories (remove the comment below to include it)
15+
# vendor/
16+
.Rproj.user

Gopkg.lock

Lines changed: 255 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Gopkg.toml example
2+
#
3+
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
4+
# for detailed Gopkg.toml documentation.
5+
#
6+
# required = ["github.com/user/thing/cmd/thing"]
7+
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
8+
#
9+
# [[constraint]]
10+
# name = "github.com/user/project"
11+
# version = "1.0.0"
12+
#
13+
# [[constraint]]
14+
# name = "github.com/user/project2"
15+
# branch = "dev"
16+
# source = "github.com/myfork/project2"
17+
#
18+
# [[override]]
19+
# name = "github.com/x/y"
20+
# version = "2.4.0"
21+
#
22+
# [prune]
23+
# non-go = false
24+
# go-tests = true
25+
# unused-packages = true
26+
27+
28+
[[constraint]]
29+
name = "github.com/aws/aws-sdk-go"
30+
version = "1.25.36"
31+
32+
[prune]
33+
go-tests = true
34+
unused-packages = true

Makefile

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
export GOBIN ?= $(shell pwd)/bin
2+
3+
GOLINT = $(GOBIN)/golint
4+
5+
GO_FILES := $(shell \
6+
find . '(' -path './go/.*' -o -path './vendor' ')' -prune \
7+
-o -name '*.go' -print | cut -b3-)
8+
9+
.PHONY: build
10+
build:
11+
go build github.com/henrywu2019/athenasql/go
12+
13+
.PHONY: install
14+
install:
15+
go mod download
16+
17+
.PHONY: dependencies
18+
dependencies:
19+
go mod download
20+
21+
.PHONY: checklic
22+
checklic:
23+
@echo "Checking for license headers..."
24+
@cd scripts && ./checklic.sh | tee -a ../lint.log
25+
26+
.PHONY: test
27+
test:
28+
go test github.com/henrywu2019/athenasql/go
29+
30+
.PHONY: cover
31+
cover:
32+
go test -race -coverprofile=cover.out -coverpkg=go/... go/...
33+
go tool cover -html=cover.out -o cover.html
34+
35+
$(GOLINT):
36+
go install golang.org/x/lint/golint
37+
38+
.PHONY: lint
39+
lint: $(GOLINT)
40+
@rm -rf lint.log
41+
@echo "Checking formatting..."
42+
@gofmt -d -s $(GO_FILES) 2>&1 | tee lint.log
43+
@echo "Checking vet..."
44+
@go vet go/... 2>&1 | tee -a lint.log
45+
@echo "Checking lint..."
46+
@$(GOLINT) go/... | tee -a lint.log
47+
@echo "Checking for unresolved FIXMEs..."
48+
@git grep -i fixme | grep -v -e vendor -e Makefile -e .md | tee -a lint.log
49+
@[ ! -s lint.log ]

0 commit comments

Comments
 (0)