-
Notifications
You must be signed in to change notification settings - Fork 186
Add golangci-lint Github Action formatter and lint checks #140
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
Changes from 5 commits
a87035b
ed507ae
39caea7
69704c9
12554af
55902bd
4f7483f
e141dbf
c597829
5836f6f
7c7e52c
6df2625
0f45e9d
6937d18
aeac25e
6570bb0
46b2465
c8d0c06
a09abef
cc51d8b
61272a9
f996d29
63e5133
9a1faa3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
# Optional: allow read access to pull request. Use with `only-new-issues` option. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These comments don't seem relevant anymore. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
# pull-requests: read | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
jmr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: stable | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v7 | ||
with: | ||
version: v2.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
version: "2" | ||
linters: | ||
disable: | ||
- errcheck # TODO(rsned): Enable once outstanding lint bugs are fixed. | ||
- mnd | ||
alan-strohm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- paralleltest | ||
- staticcheck # TODO(rsned): Enable once outstanding lint bugs are fixed. | ||
- testpackage | ||
- unused | ||
exclusions: | ||
generated: lax | ||
alan-strohm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
presets: | ||
alan-strohm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- comments | ||
- common-false-positives | ||
- legacy | ||
- std-error-handling | ||
paths: | ||
- third_party$ | ||
alan-strohm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- builtin$ | ||
- examples$ | ||
formatters: | ||
enable: | ||
- gofmt | ||
- goimports | ||
settings: | ||
gofmt: | ||
# Simplify code: gofmt with `-s` option. | ||
# Default: true | ||
jmr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
simplify: false | ||
exclusions: | ||
generated: lax | ||
paths: | ||
- third_party$ | ||
- builtin$ | ||
- examples$ |
Uh oh!
There was an error while loading. Please reload this page.