Skip to content

fix: lowercase error messages to satisfy staticcheck ST1005#336

Open
aronchick wants to merge 2 commits intodlorenc:mainfrom
aronchick:work/witty-koala
Open

fix: lowercase error messages to satisfy staticcheck ST1005#336
aronchick wants to merge 2 commits intodlorenc:mainfrom
aronchick:work/witty-koala

Conversation

@aronchick
Copy link
Copy Markdown
Contributor

Summary

Fixes lint failures in PR #321 by making error message strings start with lowercase letters.

Problem

Two error messages in internal/cli/cli.go violated staticcheck rule ST1005 (error strings should not be capitalized). This caused the Lint CI check to fail while all other checks passed.

Solution

Changed the first character of both error messages to lowercase:

  • internal/cli/cli.go:5530 - "Claude is already running..." → "claude is already running..."
  • internal/cli/cli.go:5550 - "A process..." → "a process..."

This follows Go's convention that error strings should not be capitalized since they may be wrapped in other error contexts (e.g., fmt.Errorf("failed to restart: %w", err)).

The error messages remain multi-line and user-friendly with clear instructions, just with lowercase starting characters.

Changes

  • Updated 2 error message strings in internal/cli/cli.go:5530 and internal/cli/cli.go:5550

Test Plan

  • All unit tests pass (go test ./...)
  • Staticcheck ST1005 errors resolved (verified with staticcheck)
  • Error messages remain helpful and user-facing
  • No functional changes to error handling logic

Related

Fixes lint failures in #321

🤖 Generated with Claude Code

aronchick and others added 2 commits January 29, 2026 19:10
…nflicts

The 'multiclaude claude' command was failing with "Session ID already in use"
error when Claude was already running in the agent context. This happened because
the command would attempt to restart Claude with --session-id or --resume flags
without checking if a Claude process was already active with that session ID.

Changes:
- Add process alive check for stored agent PID before restarting
- Add double-check for any running process in the tmux pane
- Provide helpful error messages with steps to exit and restart
- Import syscall package for signal-based process detection

The fix detects:
1. If the stored agent PID is still running
2. If a different process is running in the tmux pane

Users now get clear instructions on how to properly restart Claude or attach
to the existing session.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changed two error messages to start with lowercase to comply with
Go's error formatting conventions (staticcheck rule ST1005):

- "Claude is already running..." → "claude is already running..."
- "A process..." → "a process..."

These are multi-line user-facing error messages that remain helpful
while following Go's convention that error strings should not be
capitalized (since they may be wrapped in other error contexts).

Fixes lint failures in PR dlorenc#321

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@aronchick
Copy link
Copy Markdown
Contributor Author

Merge Queue: READY TO MERGE

  • CI: All 6 checks passing
  • Merge status: MERGEABLE/CLEAN
  • Reviews: None blocking
  • Scope: Lint fix (37 additions, 1 file)

This PR is ready for maintainer merge.

whitmo added a commit to whitmo/multiclaude that referenced this pull request Feb 28, 2026
whitmo added a commit to whitmo/multiclaude that referenced this pull request Feb 28, 2026
…nc#336, dlorenc#340, dlorenc#342

Add 659 lines of tests covering:
- All 18 structured error constructors from PR dlorenc#340 (individual + bulk format test)
- JSON CLI output edge cases from PR dlorenc#335 (empty/nested/all-internal subcommands)
- Structured CLIError validation for workspace names from PR dlorenc#340 integration
- Message routing edge cases from PR dlorenc#342 (no acked, mixed ack status)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
whitmo added a commit to whitmo/multiclaude that referenced this pull request Mar 1, 2026
Review findings for session ID fix (PR dlorenc#334) and error messages +
process detection (PR dlorenc#336) from dlorenc/multiclaude.

Both LGTM. One actionable finding: PR dlorenc#336 should handle EPERM
from signal(0) to avoid starting duplicate instances.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
whitmo added a commit to whitmo/multiclaude that referenced this pull request Mar 1, 2026
whitmo added a commit to whitmo/multiclaude that referenced this pull request Mar 1, 2026
…nc#336, dlorenc#340, dlorenc#342

Add 659 lines of tests covering:
- All 18 structured error constructors from PR dlorenc#340 (individual + bulk format test)
- JSON CLI output edge cases from PR dlorenc#335 (empty/nested/all-internal subcommands)
- Structured CLIError validation for workspace names from PR dlorenc#340 integration
- Message routing edge cases from PR dlorenc#342 (no acked, mixed ack status)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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