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

Discussion of code styles / ReSharper Suggestions #418

Open
gingters opened this issue Apr 14, 2023 · 1 comment
Open

Discussion of code styles / ReSharper Suggestions #418

gingters opened this issue Apr 14, 2023 · 1 comment
Labels

Comments

@gingters
Copy link
Member

Things to discuss, but actually low priority:

  • when using new() to initialize fields, ReSharper suggests adding the type explicitly (RotateCertificateFileStore::22)
    • Do we want to allow new() without type? --> Configure inspection style, otherwise fix code
  • Do we want to use matching patterns?
    • Would change this: request.BodySize > 0 && request.BodyContent == null
      to this: response is { BodySize: > 0, BodyContent: null, }
      in both ClientRequestExtensions and TargetResponseExtensions
  • In PersistenceModelExtensions::73
    instance.ClientSecrets.RemoveAll(cs => !other.ClientSecrets.Any(os => os.Id == cs.Id));
    ReSharper suggest using .All: instance.ClientSecrets.RemoveAll(cs => other.ClientSecrets.All(os => os.Id != cs.Id));
    Use suggestion or disable inspection?
@thomashilzendegen
Copy link
Contributor

Maybe Analyzers are considerable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants