Fix Codacy false-positive findings and unused variable warnings#414
Fix Codacy false-positive findings and unused variable warnings#414mason-sharp merged 1 commit intomainfrom
Conversation
Replace strlen(PSWD_KEYWORD) with sizeof(PSWD_KEYWORD) - 1 since PSWD_KEYWORD is a compile-time string literal; evaluated at compile time with no runtime overhead. Remove unused COL_LSN and COL_SNAP variables in spock_create_slot_and_read_progress(); the read_peer_progress result columns 0 and 1 are intentionally skipped in favour of the values already obtained from the replication protocol. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR contains two minor code improvements: updating password redaction to use compile-time string length calculation instead of runtime scanning, and removing unused local constants while clarifying column offset comments in database query result handling. Changes
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Duplication | 0 |
TIP This summary will be updated as you push new changes. Give us feedback
mason-sharp
left a comment
There was a problem hiding this comment.
The other flagged issues appear to be typical Postgres style code.
Replace strlen(PSWD_KEYWORD) with sizeof(PSWD_KEYWORD) - 1 since PSWD_KEYWORD is a compile-time string literal; evaluated at compile time with no runtime overhead.
Remove unused COL_LSN and COL_SNAP variables in
spock_create_slot_and_read_progress(); the read_peer_progress result columns 0 and 1 are intentionally skipped in favour of the values already obtained from the replication protocol.