-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* modulize * Prepare linter * Use goblet instead of go-bindata. * Treat Makefile * Fix lints * Fix test * Support module mode (building at out of $GOPATH) * fix lints * wip: treat make and circleci-conf * rename richgo.go to main.go * Use golangci-lint instead of gometalinter * Remove gometalinter config * rollback main.go for master(richgo.go) * fix samples
- Loading branch information
Showing
471 changed files
with
204 additions
and
184,957 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,52 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
working_directory: /go/src/github.com/kyoh86/richgo | ||
working_directory: /home/projects/github.com/kyoh86/richgo | ||
docker: | ||
- image: kyoh86/gotest | ||
- image: kyoh86/gotest:latest | ||
steps: | ||
- checkout | ||
- run: | ||
name: go test | ||
command: "go test -race ./..." | ||
cover: | ||
working_directory: /go/src/github.com/kyoh86/richgo | ||
docker: | ||
- image: kyoh86/gotest | ||
steps: | ||
- checkout | ||
name: install | ||
command: go install ./... | ||
- run: | ||
name: take a coverage | ||
command: "goverage -coverprofile=coverage.out ./..." | ||
name: test and take coverage | ||
command: | | ||
mkdir -p .circleci/test/gotest | ||
go test -v -race -coverprofile=coverage.out ./... | go-junit-report > .circleci/test/gotest/results.xml; | ||
- run: | ||
name: upload a coverage | ||
command: "bash <(curl -s https://codecov.io/bash)" | ||
lint: | ||
working_directory: /go/src/github.com/kyoh86/richgo | ||
name: upload coverage | ||
command: bash <(curl -s https://codecov.io/bash) | ||
- run: | ||
name: search lints | ||
command: golangci-lint run | ||
|
||
|
||
release: | ||
working_directory: /home/projects/github.com/kyoh86/richgo | ||
docker: | ||
- image: kyoh86/gotest | ||
- image: kyoh86/gotest:latest | ||
steps: | ||
- checkout | ||
- run: | ||
name: search lints | ||
command: "gometalinter --config /etc/gometalinter/config.json ./... > ./lints.txt || :" | ||
- run: | ||
name: reviewdog | ||
command: "cat ./lints.txt | reviewdog -f=golint -ci=circle-ci" | ||
name: run goreleaser | ||
command: curl -sL https://git.io/goreleaser | bash | ||
|
||
workflows: | ||
version: 2 | ||
commit: | ||
jobs: | ||
- build | ||
- cover: | ||
requires: | ||
- build | ||
- lint: | ||
- build: | ||
filters: | ||
branches: | ||
only: /.*/ | ||
tags: | ||
only: /.*/ | ||
- release: | ||
requires: | ||
- build | ||
filters: | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /^v[0-9]+(\.[0-9]+){2}$/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,21 @@ | ||
# goreleaser | ||
# for goreleaser output with .goreleaser.yml | ||
/dist | ||
|
||
# Compiled Object files, Static and Dynamic libs (Shared Objects) | ||
*.o | ||
*.a | ||
*.so | ||
|
||
# Folders | ||
_obj | ||
_test | ||
|
||
# Architecture specific extensions/prefixes | ||
*.[568vq] | ||
[568vq].out | ||
|
||
*.cgo1.go | ||
*.cgo2.c | ||
_cgo_defun.c | ||
_cgo_gotypes.go | ||
_cgo_export.* | ||
# for man file | ||
/richgo.1 | ||
|
||
_testmain.go | ||
# go-junit-report output in .circleci/config | ||
/.circleci/test | ||
|
||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, build with `go test -c` | ||
*.test | ||
*.prof | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
linters: | ||
enable: | ||
- unparam | ||
- scopelint |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
.PHONY: default gen test vendor install sample | ||
.PHONY: gen lint test install man sample | ||
|
||
default: | ||
echo use gen, test, vendor or install | ||
VERSION := `git vertag get` | ||
COMMIT := `git rev-parse HEAD` | ||
|
||
gen: | ||
go-bindata -o editor/test/output_test.go -pkg test -prefix sample/out_ ./sample/out_*.txt | ||
goblet -g -p test -o editor/test/output_test.go --ignore-dotfiles ./sample/out_*.txt | ||
gofmt -w editor/test/output_test.go | ||
|
||
test: | ||
go test ./... | ||
lint: gen | ||
golangci-lint run | ||
|
||
sample: | ||
sample/run.sh | ||
test: lint | ||
go test -v --race ./... | ||
|
||
install: test | ||
go install -a -ldflags "-X=main.version=$(VERSION) -X=main.commit=$(COMMIT)" ./... | ||
|
||
vendor: | ||
dep ensure | ||
man: test | ||
go run main.go --help-man > richgo.1 | ||
|
||
install: | ||
go install ./... | ||
sample: | ||
sample/run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.