Skip to content

refactor: Go cleanup — 5 audit fixes#145

Merged
tomasz-tomczyk merged 2 commits intomainfrom
cleanup/go-audit-fixes
Mar 19, 2026
Merged

refactor: Go cleanup — 5 audit fixes#145
tomasz-tomczyk merged 2 commits intomainfrom
cleanup/go-audit-fixes

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • Remove unused filePath param from collectNewRepliesForPush — the parameter was never used and the caller passed ""
  • Deduplicate skip-directory lists — extract shared skipDirs map in git.go used by both WalkFiles and walkDirectory so they can't silently diverge
  • Fix mergeConfigs boolean reset — use configPresence tracking so project no_open: false can override global no_open: true (previously impossible due to zero-value checks)
  • Refactor FileDiffForCommit — replace repeated *exec.ExitError type assertions with a single assertion and switch on exit code
  • Fix stale comment on filterPathsIgnored — function is used in production by handleFilesList, not test-only

Test plan

  • go build compiles cleanly
  • go test ./... passes (includes new TestMergeConfigsBoolOverride test)
  • CI passes

🤖 Generated with Claude Code

tomasz-tomczyk and others added 2 commits March 19, 2026 19:52
…fig merge, clean comments

1. Remove unused filePath param from collectNewRepliesForPush
2. Extract shared skipDirs map used by both WalkFiles and walkDirectory
3. Fix mergeConfigs boolean reset: use configPresence tracking so
   project no_open:false can override global no_open:true
4. Refactor FileDiffForCommit to use switch on exit code instead of
   repeated *exec.ExitError type assertions
5. Fix stale comment on filterPathsIgnored (used in production, not test-only)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…DOM queries

- Remove unused diff-match-patch vendor file, script tag, copy-deps entry,
  and package.json dependency (dead since LCS rewrite)
- Consolidate duplicate CSS rules: .line-block-modified/.line-block-changed,
  .selected/.form-selected/.focused background declarations, and
  unified/split diff selected/form-selected rules
- Remove dead .line-content h6 color declaration overridden by specific rule
- Cache getElementById('commitDropdown') into commitDropdownEl
- Fix var → const/let in newer functions (word-diff LCS, file-picker,
  commit picker, relativeTime, reloadForScope)
- Replace E2E tests that exercised diff_match_patch directly with tests
  that validate actual LCS-based word-diff rendering behavior

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tomasz-tomczyk tomasz-tomczyk merged commit 2a92800 into main Mar 19, 2026
2 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the cleanup/go-audit-fixes branch March 19, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant