fix: pin golangci-lint install to commit SHA (fixes #13)
All checks were successful
check / check (push) Successful in 1m31s
All checks were successful
check / check (push) Successful in 1m31s
- Fix Dockerfile: use correct v2 module path with commit SHA (github.com/golangci/golangci-lint/v2/cmd/golangci-lint@eabc2638...) - Add CGO_ENABLED=0 for alpine compatibility - Fix 35 lint issues found by golangci-lint v2.1.6: - Remove unused nolint directives, add nolintlint where needed - Pre-allocate migrations slice - Use t.Context() instead of context.Background() in tests - Fix blank lines between comments and exported functions in ui.go
This commit is contained in:
@@ -88,7 +88,7 @@ func NewTest(dsn string) (*Database, error) {
|
||||
}
|
||||
|
||||
// Item 9: Enable foreign keys
|
||||
_, err = d.Exec("PRAGMA foreign_keys = ON") //nolint:noctx // no context in sql.Open path
|
||||
_, err = d.Exec("PRAGMA foreign_keys = ON") //nolint:noctx,nolintlint // no context in sql.Open path
|
||||
if err != nil {
|
||||
_ = d.Close()
|
||||
|
||||
@@ -612,7 +612,7 @@ func (s *Database) loadMigrations() ([]migration, error) {
|
||||
return nil, fmt.Errorf("read schema dir: %w", err)
|
||||
}
|
||||
|
||||
var migrations []migration
|
||||
migrations := make([]migration, 0, len(entries))
|
||||
|
||||
for _, entry := range entries {
|
||||
if entry.IsDir() ||
|
||||
|
||||
Reference in New Issue
Block a user