fix(lint): resolve CI lint failures for v0.47.0 release
- resolve_conflicts.go: Mark unused `num` parameter with `_` - .golangci.yml: Add resolve_conflicts.go to G306 exclusion (JSONL files use 0644) - .golangci.yml: Add doctor/git.go to G304 exclusion (safe path construction) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -45,7 +45,7 @@ linters:
|
||||
- gosec
|
||||
text: "G306"
|
||||
# G304: Safe file reads from known JSONL and error paths
|
||||
- path: 'cmd/bd/autoflush\.go|cmd/bd/daemon_autostart\.go|cmd/bd/doctor/fix/sync_branch\.go|cmd/bd/rename_prefix\.go|cmd/bd/sync_merge\.go|internal/beads/beads\.go|internal/daemon/discovery\.go|internal/daemonrunner/sync\.go|internal/syncbranch/worktree\.go'
|
||||
- path: 'cmd/bd/autoflush\.go|cmd/bd/daemon_autostart\.go|cmd/bd/doctor/fix/sync_branch\.go|cmd/bd/doctor/git\.go|cmd/bd/rename_prefix\.go|cmd/bd/sync_merge\.go|internal/beads/beads\.go|internal/daemon/discovery\.go|internal/daemonrunner/sync\.go|internal/syncbranch/worktree\.go'
|
||||
linters:
|
||||
- gosec
|
||||
text: "G304"
|
||||
@@ -54,7 +54,7 @@ linters:
|
||||
- gosec
|
||||
text: "G302.*0700|G301.*0750"
|
||||
# G302/G306: JSONL files and error logs need 0644 for debugging/sharing
|
||||
- path: 'cmd/bd/autoflush\.go|cmd/bd/daemon\.go|cmd/bd/daemon_sync_branch\.go|cmd/bd/setup\.go|internal/daemon/registry\.go|internal/daemonrunner/daemon\.go|internal/git/worktree\.go'
|
||||
- path: 'cmd/bd/autoflush\.go|cmd/bd/daemon\.go|cmd/bd/daemon_sync_branch\.go|cmd/bd/resolve_conflicts\.go|cmd/bd/setup\.go|internal/daemon/registry\.go|internal/daemonrunner/daemon\.go|internal/git/worktree\.go'
|
||||
linters:
|
||||
- gosec
|
||||
text: "G306"
|
||||
|
||||
@@ -283,7 +283,7 @@ func parseConflicts(content string) ([]conflictRegion, []string, error) {
|
||||
}
|
||||
|
||||
// resolveConflict resolves a single conflict region using merge semantics
|
||||
func resolveConflict(conflict conflictRegion, num int) ([]string, conflictResolutionInfo) {
|
||||
func resolveConflict(conflict conflictRegion, _ int) ([]string, conflictResolutionInfo) {
|
||||
info := conflictResolutionInfo{
|
||||
LineRange: fmt.Sprintf("%d-%d", conflict.StartLine, conflict.EndLine),
|
||||
LeftLabel: conflict.LeftLabel,
|
||||
|
||||
Reference in New Issue
Block a user