Skip to content

Commit

Permalink
Update golangci-lint (#807)
Browse files Browse the repository at this point in the history
  • Loading branch information
InfiniteStash authored Aug 18, 2024
1 parent e7605da commit 52d8823
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ jobs:
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
# Silence embed linting error
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.x

- run: mkdir frontend/build && touch frontend/build/dummy
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
5 changes: 3 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
run:
timeout: 3m
go: 1.22

issues:
skip-files:
- "pkg/models/generated_.*.go$"

Expand Down Expand Up @@ -65,7 +68,5 @@ linters-settings:
disabled: true
- name: unreachable-code
- name: redefines-builtin-id
staticcheck:
go: "1.20"
exhaustive:
default-signifies-exhaustive: true
2 changes: 0 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import (
"github.com/stashapp/stash-box/pkg/user"
)

// nolint
//
//go:embed frontend/build
var ui embed.FS

Expand Down
4 changes: 2 additions & 2 deletions pkg/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func Start(rfp RepoProvider, ui embed.FS) {

go func() {
printVersion()
logger.Infof("stash-box is running on HTTPS at https://" + address + "/")
logger.Infof("stash-box is running on HTTPS at https://%s/", address)
logger.Fatal(httpsServer.ListenAndServeTLS("", ""))
}()
} else {
Expand All @@ -209,7 +209,7 @@ func Start(rfp RepoProvider, ui embed.FS) {

go func() {
printVersion()
logger.Infof("stash-box is running on HTTP at http://" + address + "/")
logger.Infof("stash-box is running on HTTP at http://%s/", address)
logger.Fatal(server.ListenAndServe())
}()
}
Expand Down

0 comments on commit 52d8823

Please sign in to comment.