-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Rework SpanByte #178
Rework SpanByte #178
Conversation
The compiler was throwing a warning that it was possible for the constructer to return null in certain circumstances. This rearranges the function so that cannot happen.
SonarCloud is still not happy, but then again, this is not For Reference: https://rules.sonarsource.com/csharp/RSPEC-112 Perhaps we should consider suppressing those? https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/suppress-warnings |
These can't be turned off because that's not always the case. These warnings are suppressed individually either in the code, by wrapping the "offending" code with a suppress warning compiler def or directly in sonarcloud analysis by marking the issue with "won't fix". The 1st one is the preferred one as it shows and documents the intented usage. |
Looking at the code, there are other places begging for improvements, like the verbose exception messages. Also I'm not fully convinced about some checks on the constructor. |
- Also add compiler defs to disable sonarcloud analysis on exceptions.
I don't think that the check on line 57 is correct. It should be: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Description
Motivation and Context
How Has This Been Tested?
Screenshots
Types of changes
Checklist: