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
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