Fix all gosec, misspell, and unparam linter errors

- Add #nosec directives with explanations for all gosec warnings in worktree operations
- Tighten directory permissions from 0755 to 0750 for better security
- Fix misspellings: archaeological -> archeological, cancelled -> canceled
- Remove unused jsonlPath parameter from syncBranchCommitAndPush
- Change branchExists to return bool instead of (bool, error) - error was never used

All changes maintain backward compatibility and improve code quality.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-11-02 20:06:05 -08:00
parent b37e8b7c1b
commit 86c645603e
6 changed files with 38 additions and 41 deletions

View File

@@ -279,7 +279,7 @@ func createExportFunc(ctx context.Context, store storage.Storage, autoCommit, au
// Auto-commit if enabled
if autoCommit {
// Try sync branch commit first
committed, err := syncBranchCommitAndPush(exportCtx, store, jsonlPath, autoPush, log)
committed, err := syncBranchCommitAndPush(exportCtx, store, autoPush, log)
if err != nil {
log.log("Sync branch commit failed: %v", err)
return
@@ -470,7 +470,7 @@ func createSyncFunc(ctx context.Context, store storage.Storage, autoCommit, auto
if autoCommit {
// Try sync branch commit first
committed, err := syncBranchCommitAndPush(syncCtx, store, jsonlPath, autoPush, log)
committed, err := syncBranchCommitAndPush(syncCtx, store, autoPush, log)
if err != nil {
log.log("Sync branch commit failed: %v", err)
return