Skip to content

fix: correct AsciiQRCode matrix indexing and documentation class name - #64

Merged
afonsoft merged 2 commits into
mainfrom
devin/fix-ascii-readme
Jul 10, 2026
Merged

afonsoft merged 2 commits into
mainfrom
devin/fix-ascii-readme

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Summary

Fixes two reported issues:

  • ASC is mistake! #52 — ASCII QR code rendering was incorrect. AsciiQRCode.GetLineByLineGraphic was reading ModuleMatrix[x][y] instead of ModuleMatrix[y][x], producing a transposed/corrupted ASCII output. The matrix is row-major (List<BitArray>), so it must be indexed by row first, then column. Corrected the indexing and updated the expected outputs in AsciiQRCodeRendererTests.

  • fix: documentaton (readme.md) #53 — Documentation used wrong class name. Replaced ASCIIQRCode with AsciiQRCode in:

    • README.md
    • README.pt-br.md
    • QRCoder.Core/Assets/nuget-readme.md
    • AGENTS.md

Verification

dotnet build QRCoder.Core.sln
dotnet test QRCoder.Core.Tests/QRCoder.Core.Tests.csproj --framework net8.0
dotnet test QRCoder.Core.Tests/QRCoder.Core.Tests.csproj --framework net10.0

All 498 tests pass on both frameworks. net48 tests were not executed because mono is unavailable locally.

Link to Devin session: https://app.devin.ai/sessions/5682754ac3ea4a03a3edc50c84591a2d
Requested by: @afonsoft

- Fix swapped x/y indices in AsciiQRCode.GetLineByLineGraphic (issue #52)
- Update AsciiQRCodeRendererTests expected outputs to match corrected rendering
- Rename ASCIIQRCode -> AsciiQRCode in README, README.pt-br, nuget-readme and AGENTS (issue #53)

Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
@afonsoft afonsoft self-assigned this Jul 10, 2026
@afonsoft
afonsoft self-requested a review July 10, 2026 19:39
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/fix-ascii-readme branch from 63dea95 to b3b5d9e Compare July 10, 2026 19:43
@github-actions

Copy link
Copy Markdown

Qodana Community for .NET

1272 new problems were found

Inspection name Severity Problems
Inconsistent Naming 🔶 Warning 537
Redundant using directive 🔶 Warning 28
Member initialized value ignored 🔶 Warning 13
Possible 'System.NullReferenceException' 🔶 Warning 9
Assignment is not used 🔶 Warning 9
Do not use object initializer for 'using' variable: Do not use object initializer for 'using' variable 🔶 Warning 8
Redundant explicit type in array creation 🔶 Warning 7
Redundant name qualifier 🔶 Warning 6
Auto-property accessor is never used: Private accessibility 🔶 Warning 5
Non-accessed field: Private accessibility 🔶 Warning 4
Possible multiple enumeration 🔶 Warning 4
Specify string culture explicitly 🔶 Warning 4
Auto-property accessor is never used: Non-private accessibility 🔶 Warning 4
Possible loss of fraction 🔶 Warning 3
Redundant cast 🔶 Warning 3
Expression is always 'true' or always 'false' 🔶 Warning 2
Redundant argument with default value 🔶 Warning 2
Conditional access qualifier expression is known to be null or not null 🔶 Warning 1
Empty general catch clause 🔶 Warning 1
Underlying type of enum is 'int' 🔶 Warning 1
Member hides static member from outer class 🔶 Warning 1
Possible 'System.InvalidOperationException' 🔶 Warning 1
Redundant explicit size specification in array creation 🔶 Warning 1
Redundant 'switch' expression arms 🔶 Warning 1
Redundant 'object.ToString()' call 🔶 Warning 1
Type member is never used: Private accessibility 🔶 Warning 1
Unused local variable 🔶 Warning 1
Type member is never used: Non-private accessibility ◽️ Notice 360
Use preferred body style: Convert into property, indexer, or event with preferred body style ◽️ Notice 38
Field can be made readonly: Private accessibility ◽️ Notice 36
Type is never used: Non-private accessibility ◽️ Notice 32
Convert into 'using' declaration ◽️ Notice 29
Member can be made private: Non-private accessibility ◽️ Notice 29
Redundant verbatim string prefix ◽️ Notice 22
Use preferred style of 'new' expression when created type is evident ◽️ Notice 10
Merge null/pattern checks into complex pattern ◽️ Notice 9
Auto-property can be made get-only: Non-private accessibility ◽️ Notice 7
Redundant string interpolation ◽️ Notice 7
Use format specifier in interpolated strings ◽️ Notice 6
Merge conditional ?: expression into conditional access ◽️ Notice 4
Class is never instantiated: Non-private accessibility ◽️ Notice 3
Use index from end expression ◽️ Notice 3
Check for reference equality instead: Check for reference equality instead ◽️ Notice 2
'if' statement can be rewritten as '?:' expression ◽️ Notice 2
Convert property into auto-property ◽️ Notice 2
For-loop can be converted into foreach-loop ◽️ Notice 2
Redundant explicit collection creation in argument of 'params' parameter ◽️ Notice 2
Auto-property can be made get-only: Private accessibility ◽️ Notice 1
Class with virtual (overridable) members never inherited: Non-private accessibility ◽️ Notice 1
Convert lambda expression into method group ◽️ Notice 1
Convert constructor into member initializers ◽️ Notice 1
Introduce optional parameters: Non-private accessibility ◽️ Notice 1
Member can be made protected: Non-private accessibility ◽️ Notice 1
Unused parameter: Non-private accessibility ◽️ Notice 1
Use string interpolation expression ◽️ Notice 1
Virtual (overridable) member is never overridden: Non-private accessibility ◽️ Notice 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2026.1.3
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

- Fix swapped x/y indices in AsciiQRCode.GetLineByLineGraphic (issue #52)
- Update AsciiQRCodeRendererTests expected outputs to match corrected rendering
- Rename ASCIIQRCode -> AsciiQRCode in README, README.pt-br, nuget-readme and AGENTS (issue #53)
- Normalize test expected strings to avoid CRLF/LF mismatches on Windows

Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/fix-ascii-readme branch from b3b5d9e to baf1a23 Compare July 10, 2026 19:49
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

💡 Need a hand with PR review? Try Gitar by Sonar!

@afonsoft
afonsoft merged commit 4d2cd39 into main Jul 10, 2026
17 of 21 checks passed
@afonsoft
afonsoft deleted the devin/fix-ascii-readme branch July 12, 2026 16:40
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