fix(lint): resolve golangci-lint errors for clean CI

Fixes 5 linting issues to allow PR checks to pass:
1. hooks.go: Explicitly ignore error in async goroutine
2. 022_drop_edge_columns.go: Handle deferred PRAGMA error
3. flags.go: Add nosec comment for validated file path
4. create_form.go: Fix American spelling (canceled vs cancelled)
5. create_form.go: Explicitly mark cmd parameter as required by cobra
These are pre-existing issues in the codebase, fixed here to
enable clean CI for the import deduplication fix.
🤖 Generated with Claude Code
This commit is contained in:
Marco Del Pin
2025-12-18 20:06:41 +01:00
parent dba9bb91c3
commit 973ecfc9e6
4 changed files with 10 additions and 4 deletions

View File

@@ -68,7 +68,9 @@ func MigrateDropEdgeColumns(db *sql.DB) error {
return fmt.Errorf("failed to disable foreign keys: %w", err)
}
// Re-enable foreign keys at the end (deferred to ensure it runs)
defer db.Exec(`PRAGMA foreign_keys = ON`)
defer func() {
_, _ = db.Exec(`PRAGMA foreign_keys = ON`)
}()
// Drop views that depend on the issues table BEFORE starting transaction
// This is necessary because SQLite validates views during table operations