Skip to content

Commit

Permalink
ci: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed Dec 16, 2024
1 parent b89c15c commit ba1f7e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ jobs:

- name: Install Tools
run: |
go install github.com/axw/gocov/gocov@latest
go install github.com/AlekSi/gocov-xml@latest
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
curl -sLk https://raw.githubusercontent.com/kevincobain2000/cover-totalizer/master/install.sh | sh
- run: go mod tidy
- run: golangci-lint run ./...
Expand Down
3 changes: 3 additions & 0 deletions pkg/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ func InitDB(dbName string) (*sql.DB, error) {
slog.Error("Error opening database", "error", err.Error())
return nil, err
}
if db == nil {
slog.Info("Database is nil")
}

_, err = db.Exec(`
CREATE TABLE IF NOT EXISTS state (
Expand Down
2 changes: 2 additions & 0 deletions pkg/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type Watcher struct {
ignorePattern string
lastLineNum int
lastFileSize int64
anomaly bool
}

func NewWatcher(
Expand All @@ -39,6 +40,7 @@ func NewWatcher(
db: db,
dbName: dbName,
filePath: filePath,
anomaly: anomaly,
matchPattern: matchPattern,
ignorePattern: ignorePattern,
lastLineKey: "llk-" + filePath,
Expand Down

0 comments on commit ba1f7e9

Please sign in to comment.