-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
154 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
" goreleaser | ||
dist/ | ||
|
||
" golangci-lint | ||
bin/ | ||
|
||
" binary created by "build" recipe | ||
gitlint | ||
|
||
" test coverage | ||
coverage.txt |
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,10 @@ | ||
{ | ||
"Aggregate": true, | ||
"Cyclo": 10, | ||
"EnableAll": true, | ||
"EnableGC": true, | ||
"LineLength": 100, | ||
"Test": true, | ||
"Vendor": true, | ||
"WarnUnmatchedDirective": true | ||
} |
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,39 @@ | ||
# This is an example goreleaser.yaml file with some sane defaults. | ||
# Make sure to check the documentation at http://goreleaser.com | ||
#before: | ||
# hooks: | ||
# # you may remove this if you don't use vgo | ||
# - go mod download | ||
# # you may remove this if you don't need go generate | ||
# - go generate ./... | ||
|
||
project_name: go-gitlint | ||
builds: | ||
- | ||
env: | ||
- CGO_ENABLED=0 | ||
main: ./cmd/go-gitlint/main.go | ||
binary: gitlint | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
goarch: | ||
- 386 | ||
- amd64 | ||
archive: | ||
replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 | ||
release: | ||
name_template: "{{.Tag}}" | ||
prerelease: auto | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
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,6 @@ | ||
--source=. | ||
--verbose | ||
--rule min-words:20 | ||
--rule min-estimate:0 | ||
--rule max-estimate:0 | ||
|
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,15 @@ | ||
dist: trusty | ||
|
||
language: go | ||
go: | ||
- "1.11.x" | ||
|
||
jobs: | ||
include: | ||
- if: type = pull_request | ||
script: make checks && | ||
bash <(curl -s https://codecov.io/bash) | ||
- if: tag IS present | ||
make checks && | ||
bash <(curl -s https://codecov.io/bash) && | ||
make release |
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,40 @@ | ||
# | ||
# Copyright 2019 George Aristy | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
# | ||
# Supported Targets: | ||
# | ||
# build: builds the binary | ||
# test: runs tests | ||
# lint: runs linters | ||
# checks: runs build+test+lint | ||
# release: releases to GitHub (requires GitHub token) | ||
# | ||
|
||
build: | ||
go build -o gitlint cmd/go-gitlint/main.go | ||
|
||
test: | ||
go test -count=1 -race -cover -coverprofile=coverage.txt -covermode=atomic ./... | ||
|
||
lint: | ||
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.14.0 | ||
./bin/golangci-lint run | ||
|
||
checks: build lint test | ||
|
||
release: | ||
./release.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package main | ||
|
||
func main() { | ||
panic("TODO - not yet implemented") | ||
} |
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 @@ | ||
module github.com/llorllale/go-gitlint |
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,22 @@ | ||
# | ||
# Copyright 2019 George Aristy | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
docker run --rm --privileged \ | ||
-v $PWD:/go/src/github.com/user/repo \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
-w /go/src/github.com/user/repo \ | ||
-e GITHUB_TOKEN \ | ||
goreleaser/goreleaser:v0.101-cgo release |