-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from quasilyte/quasilyte/enable_linters
all: enable linters and tests on github actions
- Loading branch information
Showing
21 changed files
with
177 additions
and
47 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,22 @@ | ||
# See: https://github.com/marketplace/actions/release-drafter | ||
|
||
name-template: "v$NEXT_PATCH_VERSION" | ||
tag-template: "v$NEXT_PATCH_VERSION" | ||
categories: | ||
- title: "Features" | ||
labels: | ||
- "feature" | ||
- title: "Bug Fixes" | ||
labels: | ||
- "fix" | ||
- "bugfix" | ||
- "bug" | ||
- title: "Maintenance" | ||
labels: | ||
- "task" | ||
- "documentation" | ||
change-template: "- $TITLE @$AUTHOR (#$NUMBER)" | ||
template: | | ||
## Changes | ||
$CHANGES |
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,27 @@ | ||
# This file adheres to the YAML5 style. | ||
{ | ||
name: "Go", | ||
on: ["push", "pull_request"], | ||
jobs: { | ||
build: { | ||
name: "Build", | ||
"runs-on": "ubuntu-latest", | ||
steps: [ | ||
{ | ||
name: "Set up Go 1.16", | ||
uses: "actions/setup-go@v1", | ||
"with": {"go-version": 1.16}, | ||
id: "go", | ||
}, | ||
{name: "Check out code into the Go module directory", uses: "actions/checkout@v1"}, | ||
{name: "Linter", run: "make ci-lint"}, | ||
{name: "Test", run: "make test"}, | ||
{ | ||
name: "Upload coverage", | ||
uses: "codecov/codecov-action@v2", | ||
"with": {token: "${{secrets.CODECOV_TOKEN}}", file: "./coverage.txt", fail_ci_if_error: false}, | ||
}, | ||
], | ||
}, | ||
}, | ||
} |
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,16 @@ | ||
name: Release Management | ||
|
||
on: | ||
push: | ||
# branches to consider in the event; optional, defaults to all | ||
branches: | ||
- master | ||
|
||
jobs: | ||
update_draft_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Drafts your next Release notes as Pull Requests are merged into "master" | ||
- uses: toolmantim/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 @@ | ||
.idea | ||
.vscode | ||
coverage.txt | ||
bin |
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,49 @@ | ||
{ | ||
"run": { | ||
# timeout for analysis, e.g. 30s, 5m, default is 1m | ||
"deadline": "3m", | ||
}, | ||
"fast": false, | ||
"linters": { | ||
"enable": [ | ||
"deadcode", | ||
"errcheck", | ||
"gas", | ||
"gocritic", | ||
"gofmt", | ||
"goimports", | ||
"revive", | ||
"govet", | ||
"gosimple", | ||
"ineffassign", | ||
"megacheck", | ||
"misspell", | ||
"nakedret", | ||
"staticcheck", | ||
"structcheck", | ||
"typecheck", | ||
"unconvert", | ||
"unused", | ||
"varcheck", | ||
], | ||
}, | ||
"disable": [ | ||
"depguard", | ||
"dupl", | ||
"gocyclo", | ||
"interfacer", | ||
"lll", | ||
"maligned", | ||
"prealloc", | ||
], | ||
"linters-settings": { | ||
"gocritic": { | ||
"enabled-tags": [ | ||
"style", | ||
"diagnostic", | ||
"performance", | ||
"experimental", | ||
], | ||
}, | ||
}, | ||
} |
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,19 @@ | ||
GOPATH_DIR=`go env GOPATH` | ||
|
||
test: | ||
go test -count 2 -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic ./... | ||
go test -bench=. ./... | ||
@echo "everything is OK" | ||
|
||
ci-lint: | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH_DIR)/bin v1.43.0 | ||
$(GOPATH_DIR)/bin/golangci-lint run ./... | ||
go install github.com/quasilyte/go-consistent@latest | ||
$(GOPATH_DIR)/bin/go-consistent ./... | ||
@echo "everything is OK" | ||
|
||
lint: | ||
golangci-lint run ./... | ||
@echo "everything is OK" | ||
|
||
.PHONY: ci-lint lint 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
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
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 @@ | ||
comment: false |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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
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,6 +1,8 @@ | ||
package nodetag | ||
|
||
import "go/ast" | ||
import ( | ||
"go/ast" | ||
) | ||
|
||
type Value int | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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