Skip to content

Commit

Permalink
Lint and check formatting (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
spenserblack authored Nov 27, 2023
1 parent 0bd6292 commit a60f46c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: "1.18"
- uses: golangci/golangci-lint-action@v3
- run: go build -v ./...
- run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- uses: codecov/codecov-action@v3
Expand Down
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
linters:
enable:
- gofmt
- gocritic
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ var rootCmd = &cobra.Command{
Short: "Combine your contributors avatars into a single image",
Run: func(cmd *cobra.Command, args []string) {
f, err := os.Create("montage.png")
defer f.Close()
onError(err)
defer f.Close()
client, err := api.DefaultRESTClient()
onError(err)
repository, err := repository.Current()
Expand Down
2 changes: 1 addition & 1 deletion pkg/usersource/usersource.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type User struct {
// AvatarURL is the URL of the user's avatar.
AvatarURL string `json:"avatar_url"`
// Type is either "User" or "Bot".
Type string `json:"type"`
Type string `json:"type"`
}

// UserSource provides a utility to iterate over users.
Expand Down

0 comments on commit a60f46c

Please sign in to comment.