Fix transposition problem with small ASCII renderer by Shane32 · Pull Request #645 · Shane32/QRCoder

📝 Walkthrough

Walkthrough

Transposed module access in ASCIIQRCode.GetGraphicSmall by swapping row/column indices when reading moduleData. Updated unit tests’ expected ASCII outputs to match the new rendering. No public APIs changed.

Changes

Cohort / File(s) Summary
ASCII QR renderer core
QRCoder/ASCIIQRCode.cs
In GetGraphicSmall, swapped row/column indexing when reading moduleData for current and next pixels; loop structure and palette logic unchanged.
ASCII renderer tests
QRCoderTests/AsciiQRCodeRendererTests.cs
Updated expected ASCII QR code string literals across tests to align with the transposed rendering; no test logic changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • gfoidl

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly describes the main change by stating that it fixes a transposition issue in the small ASCII renderer, directly reflecting the swap of row/column indices in the code. It clearly identifies the problem being addressed without unnecessary detail or jargon. This phrasing is specific enough that a teammate scanning PR history will immediately understand the core fix being applied.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch microtranspose

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.