Skip to content

Commit

Permalink
fixup! #96 Add lint github action
Browse files Browse the repository at this point in the history
  • Loading branch information
meian committed Mar 21, 2022
1 parent 5549d51 commit ebbfcda
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ jobs:
# NOTE: golangci-lint doesn't report multiple errors on the same line from
# different linters and just report one of the errors?

golangci-lint:
name: golangci-lint
golangci:
name: golangci
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: golangci-lint
- name: golangci
uses: reviewdog/action-golangci-lint@v2
with:
# optionally use a specific version of Go rather than the latest one
go_version: "1.18"
fail_on_error: true

# Can pass --config flag to change golangci-lint behavior and target
# directory.
Expand All @@ -35,6 +36,7 @@ jobs:
golangci_lint_flags: "--disable-all -E golint"
tool_name: golint # Change reporter name.
# level: warning # GitHub Status Check won't become failure with this level.
fail_on_error: true

# You can add more and more supported linters with different config.
errcheck:
Expand All @@ -50,3 +52,4 @@ jobs:
golangci_lint_flags: "--disable-all -E errcheck"
tool_name: errcheck
level: info
fail_on_error: true

0 comments on commit ebbfcda

Please sign in to comment.