Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# If the analyze-step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
Expand Down
91 changes: 76 additions & 15 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright the dmorph contributors.
# SPDX-License-Identifier: MPL-2.0

# Configuration file for golangci-lint
# See https://golangci-lint.run/usage/configuration/ for more information

Expand All @@ -9,25 +12,83 @@ run:

linters:
default: all
#enable:
# # Default linters
# - errcheck
# - govet
# - ineffassign
# - staticcheck
# - unused
# # Additional linters
# - gosec
# - misspell
# - revive
# - bodyclose
# - noctx

disable:
- exhaustruct
- forbidigo
- noinlineerr
- nonamedreturns
- wsl
- wsl_v5

Comment on lines 14 to 23
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Invalid key: use linters.enable-all instead of linters.default

golangci-lint doesn’t support linters.default: all. To enable all and selectively disable, use enable-all: true.

Apply this diff:

 linters:
-    default: all
+    enable-all: true
     disable:
         - exhaustruct
         - forbidigo
         - noinlineerr
         - nonamedreturns
         - wsl
         - wsl_v5
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
default: all
#enable:
# # Default linters
# - errcheck
# - govet
# - ineffassign
# - staticcheck
# - unused
# # Additional linters
# - gosec
# - misspell
# - revive
# - bodyclose
# - noctx
disable:
- exhaustruct
- forbidigo
- noinlineerr
- nonamedreturns
- wsl
- wsl_v5
linters:
enable-all: true
disable:
- exhaustruct
- forbidigo
- noinlineerr
- nonamedreturns
- wsl
- wsl_v5
🤖 Prompt for AI Agents
In the .golangci.yaml file between lines 14 and 23, replace the key 'default:
all' with 'enable-all: true' under the linters section to correctly enable all
linters. Keep the 'disable' list as is to selectively disable specific linters.
This change aligns with golangci-lint's configuration syntax requirements.

exclusions:
warn-unused: true

rules:
- path: main_test.go
- path: _test\.go
linters:
- gosec
- cyclop
- dupl
- dupword
- err113
- funlen
- gocognit
- maintidx
- nestif

- path: examples/
linters:
- err113

Comment on lines 24 to +42
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Misplaced and non-standard: move “exclusions” under issues.exclude-rules

The “exclusions” block and “warn-unused” aren’t valid under linters. Path- and linter-specific rules belong under issues.exclude-rules. “warn-unused” is not a recognized top-level option.

Proposed structure:

-    exclusions:
-        warn-unused: true
-
-        rules:
-            - path: _test\.go
-              linters:
-                  - cyclop
-                  - dupl
-                  - dupword
-                  - err113
-                  - funlen
-                  - gocognit
-                  - maintidx
-                  - nestif
-
-            - path: examples/
-              linters:
-                  - err113
+issues:
+    max-issues-per-linter: 0
+    max-same-issues: 0
+    exclude-rules:
+        # Example: ignore gochecknoglobals in internal test-exports file
+        - path: ^exports_internal_test\.go$
+          linters:
+              - gochecknoglobals
+        # Example: restrict heavy complexity checks to tests only by excluding them elsewhere
+        - path: ^(?!.*_test\.go).*$  # non-test files
+          linters:
+              - cyclop
+              - dupl
+              - dupword
+              - funlen
+              - gocognit
+              - maintidx
+              - nestif
+        # Only run err113 in examples by excluding it elsewhere, or vice versa per intent
+        - path: ^examples/
+          linters:
+              - $all

Note: golangci-lint doesn’t support “only run these linters for this path”. The approach is to exclude linters in paths where they shouldn’t run.

Please confirm against the official schema; if desired, I can tailor a precise exclude-rules matrix for your intent.


🌐 Web query:

Is "exclusions" a valid top-level option in GolangCI-Lint configuration? 
Does GolangCI-Lint support a top-level "warn-unused" setting? 
Should path- and linter-specific rules be placed under an "exclusions" block, or under "issues.exclude-rules" instead?

💡 Result:

"exclusions" is not a valid top-level option in GolangCI-Lint's configuration.
GolangCI-Lint does not have a top-level "warn-unused" setting.
Path- and linter-specific rules should be placed under "issues.exclude-rules", not an "exclusions" block.

Details and Evidence

  • No "exclusions" top-level block:
    The official GolangCI-Lint [documentation][7], open-source config references[4][9], and blog articles show the recognized top-level keys such as run, output, issues, linters, and linters-settings, but none refer to or support an exclusions key. Further, usage of exemptions is always specified within the issues block, under exclude or exclude-rules[4][9].

  • No "warn-unused" top-level setting:
    There is no mention of a warn-unused option in the config file or CLI switches[7]. Unused code warnings are handled via the unused linter and its specific settings, which are configured within linters-settings: unused: ...[8][10].

  • Where to place rules for excluding issues:

    • To exclude issues by path, linter, or code pattern, use the issues.exclude-rules list within your configuration:
      issues:
        exclude-rules:
          - path: _test\.go
            linters:
              - errcheck
            text: "error return value not checked"
      [3][4]
      This is supported directly in [documentation][3] and observed in community examples.
    • There is only one place for structured exclusion rules; issues.exclude is also supported, but for regex patterns only, not rule objects.

Additional context

  • The run.skip-dirs and run.skip-files options can be used at top-level (under run) for broad file/directory exclusions.
  • The confusion may arise from similar-sounding options in other linter tools or extensions.

Conclusion

For all issue/path/linter-specific exclusions, use issues.exclude-rules. "exclusions" and "warn-unused" are not valid top-level settings in GolangCI-Lint.[3][4][7][8][9]

Citations:


Move “exclusions” and “warn-unused” into issues.exclude-rules

GolangCI-Lint does not recognize a top-level exclusions block or warn-unused setting. All path- and linter-specific ignores must live under issues.exclude-rules.

Please update .golangci.yaml (lines 24–42) as follows:

-    exclusions:
-        warn-unused: true
-
-        rules:
-            - path: _test\.go
-              linters:
-                  - cyclop
-                  - dupl
-                  - dupword
-                  - err113
-                  - funlen
-                  - gocognit
-                  - maintidx
-                  - nestif
-
-            - path: examples/
-              linters:
-                  - err113
+issues:
+  # Prevent any unused warnings; configure via the “unused” linter instead
+  max-issues-per-linter: 0
+  max-same-issues: 0
+  exclude-rules:
+    # Don’t run complexity checks on non-test files
+    - path: ^(?!.*_test\.go).*$   # all files except *_test.go
+      linters:
+        - cyclop
+        - dupl
+        - dupword
+        - funlen
+        - gocognit
+        - maintidx
+        - nestif
+
+    # Only ignore err113 in examples/
+    - path: ^examples/
+      linters:
+        - err113

Tags:

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In .golangci.yaml around lines 24 to 42, the "exclusions" and "warn-unused"
settings are incorrectly placed at the top level. Move these settings under the
"issues.exclude-rules" section to comply with GolangCI-Lint configuration
requirements. Specifically, nest the existing path and linter-specific ignore
rules inside "issues.exclude-rules" and set "warn-unused" as a property within
that section.

settings:
cyclop:
max-complexity: 25

depguard:
rules:
main:
files:
- $all
- "!$test"
- "!**/examples/**/*"
allow:
- $gostd
- gopkg.in/yaml.v3
- github.com/Masterminds/sprig/v3
test:
files:
- $test
- "**/examples/**/*"
allow:
- $gostd
- gopkg.in/yaml.v3
- github.com/Masterminds/sprig/v3
- github.com/stretchr/testify/assert
- github.com/AlphaOne1/dmorph
- modernc.org/sqlite

exhaustive:
default-signifies-exhaustive: true

mnd:
ignored-numbers:
- "2"

paralleltest:
ignore-missing: true

perfsprint:
errorf: false

testpackage:
skip-regexp: internal_test\.go

varnamelen:
max-distance: 10

whitespace:
multi-if: true
multi-func: true

Comment on lines +43 to 94
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

❓ Verification inconclusive

Key name should be linters-settings (not settings)

Per config schema, per-linter options live under linters-settings at the top level, not under linters.settings.

Minimal fix:

-    settings:
+linters-settings:
     cyclop:
         max-complexity: 25
     depguard:
         rules:
             main:
                 files:
                     - $all
                     - "!$test"
                     - "!**/examples/**/*"
                 allow:
                     - $gostd
                     - gopkg.in/yaml.v3
                     - github.com/Masterminds/sprig/v3
             test:
                 files:
                     - $test
                     - "**/examples/**/*"
                 allow:
                     - $gostd
                     - gopkg.in/yaml.v3
                     - github.com/Masterminds/sprig/v3
                     - github.com/stretchr/testify/assert
                     - github.com/AlphaOne1/dmorph
                     - modernc.org/sqlite
     exhaustive:
         default-signifies-exhaustive: true
     mnd:
         ignored-numbers:
             - "2"
     paralleltest:
         ignore-missing: true
     perfsprint:
         errorf: false
     testpackage:
         skip-regexp: internal_test\.go
     varnamelen:
         max-distance: 10
     whitespace:
         multi-if: true
         multi-func: true

To ensure no regressions, validate the config with the linter CLI: golangci-lint run -v (or golangci-lint linters to inspect the parsed config).


Replace settings with linters-settings in .golangci.yaml

Per the official golangci-lint schema, per-linter options belong under the top-level linters-settings key—not settings.

Please update your config (in .golangci.yaml, lines 43–92) as follows:

-  settings:
+  linters-settings:
     cyclop:
         max-complexity: 25
     depguard:
         rules:
             main:
               …

After making this change, re-run golangci-lint run -v (or golangci-lint linters) to confirm the config parses correctly.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
settings:
cyclop:
max-complexity: 25
depguard:
rules:
main:
files:
- $all
- "!$test"
- "!**/examples/**/*"
allow:
- $gostd
- gopkg.in/yaml.v3
- github.com/Masterminds/sprig/v3
test:
files:
- $test
- "**/examples/**/*"
allow:
- $gostd
- gopkg.in/yaml.v3
- github.com/Masterminds/sprig/v3
- github.com/stretchr/testify/assert
- github.com/AlphaOne1/dmorph
- modernc.org/sqlite
exhaustive:
default-signifies-exhaustive: true
mnd:
ignored-numbers:
- "2"
paralleltest:
ignore-missing: true
perfsprint:
errorf: false
testpackage:
skip-regexp: internal_test\.go
varnamelen:
max-distance: 10
whitespace:
multi-if: true
multi-func: true
linters-settings:
cyclop:
max-complexity: 25
depguard:
rules:
main:
files:
- $all
- "!$test"
- "!**/examples/**/*"
allow:
- $gostd
- gopkg.in/yaml.v3
- github.com/Masterminds/sprig/v3
test:
files:
- $test
- "**/examples/**/*"
allow:
- $gostd
- gopkg.in/yaml.v3
- github.com/Masterminds/sprig/v3
- github.com/stretchr/testify/assert
- github.com/AlphaOne1/dmorph
- modernc.org/sqlite
exhaustive:
default-signifies-exhaustive: true
mnd:
ignored-numbers:
- "2"
paralleltest:
ignore-missing: true
perfsprint:
errorf: false
testpackage:
skip-regexp: internal_test\.go
varnamelen:
max-distance: 10
whitespace:
multi-if: true
multi-func: true
🤖 Prompt for AI Agents
In .golangci.yaml between lines 43 and 92, replace the top-level key "settings"
with "linters-settings" to correctly specify per-linter options according to the
golangci-lint schema. This involves renaming the "settings:" key to
"linters-settings:" while keeping the nested configuration unchanged. After
updating, run golangci-lint to verify the configuration parses without errors.

issues:
max-issues-per-linter: 0
Expand Down
4 changes: 3 additions & 1 deletion dialects.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

// BaseDialect is a convenience type for databases that manage the necessary operations solely using
// queries. Defining the CreateTemplate, AppliedTemplate and RegisterTemplate enables the BaseDialect to
// perform all the necessary operation to fulfill the Dialect interface.
// perform all the necessary operations to fulfill the Dialect interface.
type BaseDialect struct {
CreateTemplate string // statement ensuring the existence of the migration table
AppliedTemplate string // statement getting applied migrations ordered by application date
Expand All @@ -32,11 +32,13 @@ func (b BaseDialect) EnsureMigrationTableExists(db *sql.DB, tableName string) er

if execErr != nil {
rollbackErr := tx.Rollback()

return errors.Join(execErr, rollbackErr)
}

if err := tx.Commit(); err != nil {
rollbackErr := tx.Rollback()

return errors.Join(err, rollbackErr)
}

Expand Down
31 changes: 17 additions & 14 deletions dialects_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright the DMorph contributors.
// SPDX-License-Identifier: MPL-2.0

package dmorph
package dmorph_test

import (
"database/sql"
Expand All @@ -10,6 +10,8 @@ import (
"testing"

"github.com/stretchr/testify/assert"

"github.com/AlphaOne1/dmorph"
)

// TestDialectStatements verifies that each database dialect has valid and
Expand All @@ -19,15 +21,15 @@ func TestDialectStatements(t *testing.T) {
// that the statements for the databases are somehow filled
tests := []struct {
name string
caller func() BaseDialect
caller func() dmorph.BaseDialect
}{
{name: "CSVQ", caller: DialectCSVQ},
{name: "DB2", caller: DialectDB2},
{name: "MSSQL", caller: DialectMSSQL},
{name: "MySQL", caller: DialectMySQL},
{name: "Oracle", caller: DialectOracle},
{name: "Postgres", caller: DialectPostgres},
{name: "SQLite", caller: DialectSQLite},
{name: "CSVQ", caller: dmorph.DialectCSVQ},
{name: "DB2", caller: dmorph.DialectDB2},
{name: "MSSQL", caller: dmorph.DialectMSSQL},
{name: "MySQL", caller: dmorph.DialectMySQL},
{name: "Oracle", caller: dmorph.DialectOracle},
{name: "Postgres", caller: dmorph.DialectPostgres},
{name: "SQLite", caller: dmorph.DialectSQLite},
}

re := regexp.MustCompile("%s")
Expand Down Expand Up @@ -77,17 +79,17 @@ func TestCallsOnClosedDB(t *testing.T) {
}

assert.Error(t,
DialectSQLite().EnsureMigrationTableExists(db, "irrelevant"),
dmorph.DialectSQLite().EnsureMigrationTableExists(db, "irrelevant"),
"expected error on closed database")

_, err := DialectSQLite().AppliedMigrations(db, "irrelevant")
_, err := dmorph.DialectSQLite().AppliedMigrations(db, "irrelevant")
assert.Error(t, err, "expected error on closed database")
}

// TestEnsureMigrationTableExistsSQLError tests the EnsureMigrationTableExists function
// for handling SQL errors during execution.
func TestEnsureMigrationTableExistsSQLError(t *testing.T) {
d := BaseDialect{
d := dmorph.BaseDialect{
CreateTemplate: `
CRATE TABLE test (
id VARCHAR(255) PRIMARY KEY,
Expand All @@ -114,9 +116,10 @@ func TestEnsureMigrationTableExistsSQLError(t *testing.T) {
assert.Error(t, d.EnsureMigrationTableExists(db, "test"), "expected error")
}

// TestEnsureMigrationTableExistsCommitError tests the behavior of EnsureMigrationTableExists when a commit error occurs.
// TestEnsureMigrationTableExistsCommitError tests the behavior of EnsureMigrationTableExists
// when a commit error occurs.
func TestEnsureMigrationTableExistsCommitError(t *testing.T) {
d := BaseDialect{
d := dmorph.BaseDialect{
CreateTemplate: `
CREATE TABLE t0 (
id INTEGER PRIMARY KEY
Expand Down
15 changes: 15 additions & 0 deletions exports_internal_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package dmorph

import "database/sql"

// The exported names in this file are only used for internal testing and are not part of the public API.

var (
TapplyStepsStream = applyStepsStream
TmigrationFromFileFS = migrationFromFileFS
TmigrationOrder = migrationOrder
)
Comment on lines +10 to +14
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Replace global var aliases with thin wrapper functions to satisfy gochecknoglobals

Global variables trigger gochecknoglobals. Use wrappers instead; behavior unchanged and constrained to _test.go files.

Apply this diff:

-package dmorph
-
-import "database/sql"
-
-// The exported names in this file are only used for internal testing and are not part of the public API.
-
-var (
-    TapplyStepsStream    = applyStepsStream
-    TmigrationFromFileFS = migrationFromFileFS
-    TmigrationOrder      = migrationOrder
-)
-
-func (m *Morpher) TapplyMigrations(db *sql.DB, lastMigration string) error {
-    return m.applyMigrations(db, lastMigration)
-}
+package dmorph
+
+import (
+    "database/sql"
+    "io"
+    "io/fs"
+    "log/slog"
+)
+
+// The exported names in this file are only used for internal testing and are not part of the public API.
+
+func TapplyStepsStream(tx *sql.Tx, r io.Reader, id string, log *slog.Logger) error {
+    return applyStepsStream(tx, r, id, log)
+}
+
+func TmigrationFromFileFS(name string, dir fs.FS, log *slog.Logger) FileMigration {
+    return migrationFromFileFS(name, dir, log)
+}
+
+func TmigrationOrder(m, n Migration) int {
+    return migrationOrder(m, n)
+}
+
+func (m *Morpher) TapplyMigrations(db *sql.DB, lastMigration string) error {
+    return m.applyMigrations(db, lastMigration)
+}
🧰 Tools
🪛 golangci-lint (2.2.2)

8-8: TapplyStepsStream is a global variable

(gochecknoglobals)


9-9: TmigrationFromFileFS is a global variable

(gochecknoglobals)


10-10: TmigrationOrder is a global variable

(gochecknoglobals)

🤖 Prompt for AI Agents
In exports_internal_test.go around lines 7 to 11, replace the global variable
aliases with thin wrapper functions that return the original variables. This
avoids global variables triggering gochecknoglobals while preserving the same
behavior. Define functions named TapplyStepsStream, TmigrationFromFileFS, and
TmigrationOrder that return the respective original variables instead of using
var aliases.


func (m *Morpher) TapplyMigrations(db *sql.DB, lastMigration string) error {
return m.applyMigrations(db, lastMigration)
}
9 changes: 5 additions & 4 deletions file_migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func WithMigrationsFromFS(d fs.ReadDirFS) MorphOption {
if err == nil {
for _, entry := range dirEntry {
morpher.Log.Info("entry", slog.String("name", entry.Name()))

if entry.Type().IsRegular() {
morpher.Migrations = append(morpher.Migrations,
migrationFromFileFS(entry.Name(), d, morpher.Log))
Expand All @@ -83,7 +84,7 @@ func WithMigrationsFromFS(d fs.ReadDirFS) MorphOption {
}
}

// migrationFromFileFS creates a FileMigration instance for a specific migration file from an fs.FS directory.
// migrationFromFileFS creates a FileMigration instance for a specific migration file from a fs.FS directory.
func migrationFromFileFS(name string, dir fs.FS, log *slog.Logger) FileMigration {
return FileMigration{
Name: name,
Expand All @@ -105,8 +106,8 @@ func migrationFromFileFS(name string, dir fs.FS, log *slog.Logger) FileMigration
// applyStepsStream executes database migration steps read from an io.Reader, separated by semicolons, in a transaction.
// Returns the corresponding error if any step execution fails. Also, as some database drivers or engines seem to not
// support comments, leading comments are removed. This function does not undertake efforts to scan the SQL to find
// other comments. So leading comments telling what a step is going to do, work. But comments in the middle of a
// statement will not be removed. At least with SQLite this will lead to hard to find errors.
// other comments. Such leading comments telling what a step is going to do, work. But comments in the middle of a
// statement will not be removed. At least with SQLite this will lead to hard-to-find errors.
func applyStepsStream(tx *sql.Tx, r io.Reader, id string, log *slog.Logger) error {
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
buf := bytes.Buffer{}

Expand Down Expand Up @@ -138,7 +139,7 @@ func applyStepsStream(tx *sql.Tx, r io.Reader, id string, log *slog.Logger) erro
}
}

// cleanup after, for final statement without the closing ; on a new line
// cleanup after, for the final statement without the closing `;` on a new line
if buf.Len() > 0 {
log.Info("migration step",
slog.String("id", id),
Expand Down
25 changes: 14 additions & 11 deletions file_migration_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright the DMorph contributors.
// SPDX-License-Identifier: MPL-2.0

package dmorph
package dmorph_test

import (
"bytes"
Expand All @@ -12,6 +12,8 @@ import (
"testing"

"github.com/stretchr/testify/assert"

"github.com/AlphaOne1/dmorph"
)

func TestWithMigrationFromFile(t *testing.T) {
Expand All @@ -31,9 +33,9 @@ func TestWithMigrationFromFile(t *testing.T) {
defer func() { _ = db.Close() }()
}

runErr := Run(db,
WithDialect(DialectSQLite()),
WithMigrationFromFile("testData/01_base_table.sql"))
runErr := dmorph.Run(db,
dmorph.WithDialect(dmorph.DialectSQLite()),
dmorph.WithMigrationFromFile("testData/01_base_table.sql"))

assert.NoError(t, runErr, "did not expect an error")
}
Expand All @@ -55,21 +57,22 @@ func TestWithMigrationFromFileError(t *testing.T) {
defer func() { _ = db.Close() }()
}

runErr := Run(db,
WithDialect(DialectSQLite()),
WithMigrationFromFile("testData/00_non_existent.sql"))
runErr := dmorph.Run(db,
dmorph.WithDialect(dmorph.DialectSQLite()),
dmorph.WithMigrationFromFile("testData/00_non_existent.sql"))

var pathErr *fs.PathError
assert.ErrorAs(t, runErr, &pathErr, "unexpected error")
}

// TestMigrationFromFileFSError validates that migrationFromFileFS returns an error when the specified file does not exist.
// TestMigrationFromFileFSError validates that migrationFromFileFS returns an error
// when the specified file does not exist.
func TestMigrationFromFileFSError(t *testing.T) {
dir, dirErr := os.OpenRoot("testData")

assert.NoError(t, dirErr, "could not open test data directory")

mig := migrationFromFileFS("nonexistent", dir.FS(), slog.Default())
mig := dmorph.TmigrationFromFileFS("nonexistent", dir.FS(), slog.Default())

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
err := mig.Migrate(nil)

Expand Down Expand Up @@ -101,7 +104,7 @@ func TestApplyStepsStreamError(t *testing.T) {

assert.NoError(t, txErr, "expected no tx error")

err := applyStepsStream(tx, &buf, "test", slog.Default())
err := dmorph.TapplyStepsStream(tx, &buf, "test", slog.Default())

assert.Error(t, err, "expected error")

Expand All @@ -114,7 +117,7 @@ func TestApplyStepsStreamError(t *testing.T) {
buf.Reset()
buf.WriteString("utter nonsense\n;")

err = applyStepsStream(tx, &buf, "test", slog.Default())
err = dmorph.TapplyStepsStream(tx, &buf, "test", slog.Default())

assert.Error(t, err, "expected error")

Expand Down
Loading
Loading