Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce reviewdog and drop golint #34

Merged
merged 2 commits into from
May 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/reviewdog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: reviewdog
on: [pull_request]

jobs:
staticcheck:
name: staticcheck
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
persist-credentials: false
- name: staticcheck
uses: reviewdog/action-staticcheck@v1
with:
reporter: github-pr-review
level: warning

misspell:
name: misspell
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
persist-credentials: false
- name: misspell
uses: reviewdog/action-misspell@v1
with:
reporter: github-pr-review
level: warning
locale: "US"

actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: reviewdog/action-actionlint@v1
with:
reporter: github-pr-review
9 changes: 2 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,11 @@ jobs:
- windows-latest
steps:
- name: setup go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.x
- name: checkout
uses: actions/checkout@v2
- name: lint
run: |
go install golang.org/x/lint/golint@latest
golint -set_exit_status ./...
if: "matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest'"
uses: actions/checkout@v3
- name: test
run: |
go test -coverprofile coverage.out ./...
Expand Down
5 changes: 0 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,13 @@ deps:

.PHONY: devel-deps
devel-deps:
go install golang.org/x/lint/golint@latest
go install github.com/tcnksm/ghr@latest
go install github.com/Songmu/godzil/cmd/godzil@latest

.PHONY: test
test:
go test

.PHONY: lint
lint: devel-deps
golint -set_exit_status

.PHONY: build
build: deps
go build -ldflags=$(BUILD_LDFLAGS) ./cmd/ecschedule
Expand Down