Skip to content

Commit

Permalink
init check
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryAtUber committed Feb 10, 2020
0 parents commit fc1552e
Show file tree
Hide file tree
Showing 109 changed files with 13,644 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
coverage:
status:
patch: false

range: 70..100 # First number represents red, and second represents green
# (default is 70..100)
round: down # up, down, or nearest
precision: 2 # Number of decimal places, between 0 and 5

# Ignoring Paths
# --------------
# which folders/files to ignore
ignore:
- */img/.*
- */examples/.*
- */scripts/.*
- setup.py
- versioneer.py

# Pull request comments:
# ----------------------
# Diff is the Coverage Diff of the pull request.
# Files are the files impacted by the pull request
comment:
layout: diff, files # accepted in any order: reach, diff, flags, and/or files
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/
.Rproj.user
255 changes: 255 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Gopkg.toml example
#
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true


[[constraint]]
name = "github.com/aws/aws-sdk-go"
version = "1.25.36"

[prune]
go-tests = true
unused-packages = true
49 changes: 49 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
export GOBIN ?= $(shell pwd)/bin

GOLINT = $(GOBIN)/golint

GO_FILES := $(shell \
find . '(' -path './go/.*' -o -path './vendor' ')' -prune \
-o -name '*.go' -print | cut -b3-)

.PHONY: build
build:
go build github.com/henrywu2019/athenasql/go

.PHONY: install
install:
go mod download

.PHONY: dependencies
dependencies:
go mod download

.PHONY: checklic
checklic:
@echo "Checking for license headers..."
@cd scripts && ./checklic.sh | tee -a ../lint.log

.PHONY: test
test:
go test github.com/henrywu2019/athenasql/go

.PHONY: cover
cover:
go test -race -coverprofile=cover.out -coverpkg=go/... go/...
go tool cover -html=cover.out -o cover.html

$(GOLINT):
go install golang.org/x/lint/golint

.PHONY: lint
lint: $(GOLINT)
@rm -rf lint.log
@echo "Checking formatting..."
@gofmt -d -s $(GO_FILES) 2>&1 | tee lint.log
@echo "Checking vet..."
@go vet go/... 2>&1 | tee -a lint.log
@echo "Checking lint..."
@$(GOLINT) go/... | tee -a lint.log
@echo "Checking for unresolved FIXMEs..."
@git grep -i fixme | grep -v -e vendor -e Makefile -e .md | tee -a lint.log
@[ ! -s lint.log ]
Loading

0 comments on commit fc1552e

Please sign in to comment.