Repository navigation
Enforce variable declaration style and format solution - #714
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
QR generation and data QRCoder/QRCodeGenerator.cs, QRCoder/QRCodeGenerator/*, QRCoder/QRCodeData.cs |
QR generation, capacity selection, matrix placement, and QR data code now declare local types explicitly. |
QR renderers QRCoder/ASCIIQRCode.cs, QRCoder/ArtQRCode.cs, QRCoder/Base64QRCode.cs, QRCoder/BitmapByteQRCode.cs, QRCoder/PdfByteQRCode.cs, QRCoder/PngByteQRCode.cs, QRCoder/PostscriptQRCode.cs, QRCoder/QRCode.cs, QRCoder/SvgQRCode.cs, QRCoder.Xaml/XamlQRCode.cs |
Renderer implementations use explicit local types. The supplied summaries report unchanged rendering behavior. |
Payload generation QRCoder/PayloadGenerator.cs, QRCoder/PayloadGenerator/* |
Payload validation, encoding, and serialization code uses explicit local types. The supplied summaries report unchanged validation and payload behavior. |
Supporting code and applications .editorconfig, QRCoder/Extensions/*, QRCoderApiTests/*, QRCoderBenchmarks/*, QRCoderConsole/*, QRCoderDemo/*, QRCoderSamples/* |
Two .editorconfig preferences change from suggestions to warnings. Extensions, applications, API approval code, benchmarks, and samples use explicit local types. |
Tests QRCoderTests/* |
Test locals use explicit types. Test inputs, assertions, and expected outputs remain unchanged. |
Estimated code review effort: 2 (Simple) | ~15 minutes
Change: Refactor
Suggested reviewers: codebude, krisvandermotten
Merge Risk: 
Minimal · up to 5e6ec
-
The previously flagged netstandard1.3 declaration is explicitly typed at the reviewed head. No actionable merge-blocking risk remains after normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 76.64% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 107 functions across 51 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
| csharp_style_var_for_built_in_types = false:suggestion | ||
| csharp_style_var_for_built_in_types = false:warning | ||
| csharp_style_var_when_type_is_apparent = true:warning | ||
| csharp_style_var_elsewhere = true:suggestion | ||
| csharp_style_var_elsewhere = false:warning |
|
This PR enforces proper variable declarations throughout the codebase (which should match our review process). If it proves too troublesome I may wish to downgrade the alert level back to |
| { | ||
| _writer = writer; | ||
| } |
There was a problem hiding this comment.
It can but dotnet format changed it so I presume that's part of the correct styling according to .editorconfig
Updated [QRCoder](https://github.com/Shane32/QRCoder) from 1.8.1 to 1.9.0. <details> <summary>Release notes</summary> _Sourced from [QRCoder's releases](https://github.com/Shane32/QRCoder/releases)._ ## 1.9.0 ## What's Changed * Update to .NET 10 SDK and .slnx solution file format by @KrisVandermotten in Shane32/QRCoder#707 * Optimize QRCodeData.SaveRawData and QRCodeData.GetRawData by @KrisVandermotten in Shane32/QRCoder#708 * Optimize rawData QrCodeData constructor and improve input validation by @KrisVandermotten in Shane32/QRCoder#709 * Allow GiroCode generation without an amount by @OidaTiftla in Shane32/QRCoder#710 * Fix build by removing stale raw-data assertion by @Shane32 in Shane32/QRCoder#711 * Replace string concatenation with StringBuilder and invariant interpolation by @kamilla11 in Shane32/QRCoder#696 * Reduce PDF rendering allocations with a shared content builder by @Shane32 in Shane32/QRCoder#712 * Avoid temporary color arrays in PDF and bitmap renderers by @Shane32 in Shane32/QRCoder#713 * Enforce variable declaration style and format solution by @Shane32 in Shane32/QRCoder#714 * Format the SwissQrCode amount with the invariant culture by @menes97 in Shane32/QRCoder#715 * Simplify date formatting inside AppendInvariant calls by @Shane32 in Shane32/QRCoder#717 * Use NuGet Trusted Publishing and update workflow actions by @Shane32 in Shane32/QRCoder#718 * Run NuGet release publishing from the package output directory by @Shane32 in Shane32/QRCoder#719 ## New Contributors * @OidaTiftla made their first contribution in Shane32/QRCoder#710 * @kamilla11 made their first contribution in Shane32/QRCoder#696 * @menes97 made their first contribution in Shane32/QRCoder#715 **Full Changelog**: Shane32/QRCoder@v1.8.1...v1.9.0 Commits viewable in [compare view](Shane32/QRCoder@v1.8.1...v1.9.0). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Summary
varpreferences as warnings: prefer explicit types for built-ins and elsewhere, andvarwhen the initializer makes the type apparent.dotnet formatacross the solution, preserving span/array declarations and nullable annotations across target frameworks.Test plan
dotnet build QRCoderTests/QRCoderTests.csproj --no-restore: all five test target frameworks build with zero warnings or errors.dotnet format style QRCoder.slnx --diagnostics IDE0007 IDE0008 --verify-no-changes --no-restore --severity warn: passed for the loaded projects.git diff --check: passed.Full-solution formatting verification still reports existing IDE0060 diagnostics. References for
netstandard1.3and the UWP demo could not be loaded.Summary by CodeRabbit