-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: Reduce amount of warnings from 180 to 17 #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Added doc comments to all public fields (phew!) - Added nonempty constructors to entities where a field could be null after creation (like strings). > Some of these constuctors throw an error if app attempted to instantiate with empty values. > Entities still have 0-argument constructors to work with DbSet. - Some entities now have simplified constructors. > For example, the new Purchase constructor sets 8 fields using 3 parameters. > The new Ticket constructor sets 5 fields with 1 parameter. - Fixed tests as a result of breaking them. > Enable `nullable` in test project > Most should be more robust by avoiding magic strings > Test object getters, like a `testUser` getter, reduces code duplication > Redundant fields in test objects have been removed while ensuring the tests still pass. - Removed `LoginAttempt` entity as stated in a TODO comment - Removed pragma warning ignores - Removed unused usings
Codecov Report
@@ Coverage Diff @@
## develop #183 +/- ##
===========================================
+ Coverage 11.55% 12.39% +0.83%
===========================================
Files 142 141 -1
Lines 6680 6865 +185
Branches 455 478 +23
===========================================
+ Hits 772 851 +79
- Misses 5891 5983 +92
- Partials 17 31 +14
|
Created new simplified constructor for UserResponse Remove commented out code Remove an unused using
SonarCloud Quality Gate failed. |
Really cool that you took the combat on this Omid. Much appreciated. 🙌 I will provide my thoughts in a few days. 🙂 |
This PR cherry-picks the xml comments created in #183, reduces warnings by marking properties as required, instead of using constructors. Also removes unused using statements, and other low hanging warnings. Note, there is still a fair bit of warnings since the tests haven't been refactored in this PR. I think the best way to address the warnings from there, would be to migrate them to use the builders, though that seems out of scope of this PR. --------- Co-authored-by: Omid Marfavi <21163286+marfavi@users.noreply.github.com>
Closed, since #310 was merged in favour of this |
Added doc comments to all public fields (phew!)
Added nonempty constructors to entities where a field could be null after creation (like strings).
Some entities now have simplified constructors.
Fixed tests as a result of breaking them.
nullable
in test projecttestUser
getter, reduces code duplicationRemoved
LoginAttempt
entity as stated in a TODO commentRemoved pragma warning ignores
Removed unused usings