Skip to content

Commit

Permalink
Set up workflow for golangci (#2020)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmorel-35 authored Aug 18, 2021
1 parent 20f2e99 commit 8bd2892
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on: [push, pull_request]
name: linter

jobs:
lint:
strategy:
matrix:
go-version: [1.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v2

- name: golangci-lint
uses: golangci/golangci-lint-action@5c56cd6c9dc07901af25baab6f2b0d9f3b7c3018 #v2.5.2
with:
version: v1.41
args: --verbose
32 changes: 32 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
linters:
# TODO: fix errors so that all of the linters below pass.
# The linters that are commented out, as well as those explicitly disabled,
# are currently failing. We should fix those failures or define exclusion
# rules, and then enable those linters.
enable:
- dogsled
- dupl
- gofmt
- goimports
# - gosec
- misspell
- nakedret
# - stylecheck
# - unconvert
# - unparam
# - whitespace
disable:
- errcheck
- gosimple
- staticcheck
- ineffassign
- unused
issues:
exclude-rules:
- linters:
- dogsled
text: "declaration has 3 blank identifiers"
path: _test\.go
- linters:
- dupl
path: _test\.go
2 changes: 1 addition & 1 deletion github/activity_notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type NotificationListOptions struct {
//
// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/activity/#list-notifications-for-the-authenticated-user
func (s *ActivityService) ListNotifications(ctx context.Context, opts *NotificationListOptions) ([]*Notification, *Response, error) {
u := fmt.Sprintf("notifications")
u := "notifications"
u, err := addOptions(u, opts)
if err != nil {
return nil, nil, err
Expand Down

0 comments on commit 8bd2892

Please sign in to comment.