Skip to content
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

Modernize codebase to use latest language features #107

Merged
merged 1 commit into from
Jan 16, 2024
Merged

Conversation

Tyrrrz
Copy link
Contributor

@Tyrrrz Tyrrrz commented Jan 15, 2024

No description provided.

Copy link

codecov bot commented Jan 15, 2024

Codecov Report

Attention: 59 lines in your changes are missing coverage. Please review.

Comparison is base (ad12c77) 64.09% compared to head (4788590) 63.76%.

Files Patch % Lines
src/Passwordless/Models/Credential.cs 0.00% 17 Missing ⚠️
src/Passwordless/Models/VerifiedUser.cs 28.57% 10 Missing ⚠️
src/Passwordless/Models/SetAliasRequest.cs 0.00% 8 Missing ⚠️
src/Passwordless/Models/PasswordlessUserSummary.cs 0.00% 7 Missing ⚠️
src/Passwordless/PasswordlessClient.cs 79.16% 4 Missing and 1 partial ⚠️
...re/Services/Implementations/PasswordlessService.cs 90.90% 3 Missing ⚠️
src/Passwordless/Helpers/Base64UrlConverter.cs 0.00% 3 Missing ⚠️
src/Passwordless/PasswordlessHttpHandler.cs 50.00% 1 Missing and 1 partial ⚠️
src/Passwordless/Models/AliasPointer.cs 0.00% 1 Missing ⚠️
src/Passwordless/Models/CredentialDescriptor.cs 0.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
- Coverage   64.09%   63.76%   -0.34%     
==========================================
  Files          39       43       +4     
  Lines         855      723     -132     
  Branches       63       58       -5     
==========================================
- Hits          548      461      -87     
+ Misses        297      253      -44     
+ Partials       10        9       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jonashendrickx jonashendrickx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Primary constructors are kind of awful, and you still cannot make injections readonly. If it's 'private' I would kind of expect it to start with '_' too.

It will make the code base just harder to navigate if it doesn't follow the naming conventions of private fields.

Maybe we can suppress 'IDE0290' until it's more mature?

@Tyrrrz
Copy link
Contributor Author

Tyrrrz commented Jan 16, 2024

Primary constructors are kind of awful, and you still cannot make injections readonly. If it's 'private' I would kind of expect it to start with '_' too.

It will make the code base just harder to navigate if it doesn't follow the naming conventions of private fields.

Maybe we can suppress 'IDE0290' until it's more mature?

I agree that the mismatch in naming is confusing, but I still think that the reduction in noise due to removed boilerplate code is well worth it. The way I like to model it conceptually is as if the class instance is a closure generated from inside the constructor, in which case being able to reference constructor parameters makes more sense.

@Tyrrrz Tyrrrz merged commit b39384d into main Jan 16, 2024
7 checks passed
@Tyrrrz Tyrrrz deleted the modernize branch January 16, 2024 15:35
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.

3 participants