Repository navigation
fix: best practices, new tests, and bilingual documentation - #40
Merged
Merged
Conversation
…tion types - Fix MSBuild OS platform conditions in csproj files (was comparing bool to string) - Add GC.SuppressFinalize to all Dispose implementations (CA1816) - Replace generic Exception with ArgumentOutOfRangeException in ArtQRCode - Replace generic Exception with InvalidOperationException in QRCodeData - Remove obsolete SKFilterQuality usage (CS0618) - Fix repository URL to point to afonsoft/QRCoder.Core - Update test to match new exception type Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
- QRCodeGenerator: ECC levels, encoding modes, UTF-8, versioning, dispose - QRCodeData: round-trip serialization (Uncompressed/Deflate/GZip), file I/O - AbstractQRCode: SetQRCodeData, idempotent Dispose - QRCode: colors, hex parsing, quiet zones, helper methods - AsciiQRCode: custom symbols, line-by-line, quiet zones - PngByteQRCode: validation, alpha colors, quiet zones - SKBitmapByteQRCode: default/hex/byte colors, helpers - Base64QRCode: PNG/JPEG output, icon support - PdfByteQRCode: PDF validation, colors, DPI - PostscriptQRCode: PS/EPS output, colors, view box - ArtQRCode: pixel size factor, quiet zone styles, argument validation - Extensions: SKColor ToHex/FromHex, StringValueAttribute - DataTooLongException: with/without version - Size struct: constructor, properties - PayloadGenerator: WiFi, Mail, URL, SMS, PhoneNumber, Geolocation, Bookmark - Cross-platform: deterministic output, scaling - HelperFunctions: hash consistency Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
- Create comprehensive usage guide in Portuguese (pt-BR) - Create comprehensive usage guide in English (en-US) - Both guides cover all output formats: QRCode, PNG, SVG, Base64, PDF, ASCII, Postscript, EPS, Artistic, BMP - Include PayloadGenerator examples: WiFi, URL, Email, SMS, Phone, Geolocation, Bitcoin, vCard, Calendar Events - Add cross-platform examples: ASP.NET Core API, .NET MAUI, Console - Document ECC levels, serialization, UTF-8, and version settings - Update README with bilingual description and links to documentation - Update Quick Start example to use SkiaSharp (not System.Drawing) - Update test count to reflect new tests Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
C# 7.3 (net48 target) does not support 'using var' declarations. Changed to match existing test code style. Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



All Submissions:
New Feature Submissions:
Changes to Core Features:
Summary
This PR improves code quality, adds comprehensive test coverage, and creates bilingual documentation for the QRCoder.Core library.
Bug Fixes
SkiaSharp.NativeAssets.Linux/macOS/Win32were comparing a boolean return value (True/False) against a string ('Linux'), so the native assets were never conditionally included on any platform. Fixed to evaluate the boolean directly.GC.SuppressFinalize(this)toDispose()inAbstractQRCode,QRCodeData, andQRCodeGenerator— following the standard .NET Dispose pattern.ArtQRCodenow throwsArgumentOutOfRangeException(wasException);QRCodeDatanow throwsInvalidOperationExceptionfor invalid raw data.SKPaint.FilterQuality = SKFilterQuality.HighfromQRCode.csandArtQRCode.cs, eliminating all build warnings.RepositoryUrlin csproj fromcodebude/QRCodertoafonsoft/QRCoder.Core.New Tests (+92 tests)
Added
BestPracticesTests.cscovering previously untested or low-coverage areas:QRCodeGenerator: ECC levels, encoding modes, UTF-8/BOM, versioning, dispose safetyQRCodeData: round-trip serialization (Uncompressed/Deflate/GZip), file I/O, disposeQRCode: colors, hex parsing, quiet zones, parameterless constructor, helperAsciiQRCode: custom symbols, line-by-line, quiet zones, helperPngByteQRCode: PNG validation, alpha colors, quiet zonesSKBitmapByteQRCode: default/hex/byte colors, helpersBase64QRCode: PNG/JPEG output, icon supportPdfByteQRCode: PDF header validation, colors, DPIPostscriptQRCode: PS/EPS output, colors, view box, quiet zonesArtQRCode: pixel size factor, quiet zone styles, argument validationExtensions: SKColor ToHex/FromHex edge cases, StringValueAttributeDataTooLongException: with/without versionSize struct: constructor, defaults, propertiesPayloadGenerator: WiFi, Mail, URL, SMS, PhoneNumber, Geolocation, BookmarkDocumentation
Test Results
Link to Devin session: https://app.devin.ai/sessions/20d5c57d4fc24948a55b3ebb99c84309
Requested by: @afonsoft