-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add rules, fix issues and cleanup #96
base: master
Are you sure you want to change the base?
Conversation
foreach (var element in servicesList) | ||
{ | ||
var service = Create(element); | ||
|
||
if (service is not null) | ||
{ | ||
deviceServices.Add(service); | ||
} | ||
} |
Check notice
Code scanning / CodeQL
Missed opportunity to use Select Note
maps its iteration variable to another variable
@@ -170,7 +219,7 @@ public static IEnumerable<string> BuildVideoHeader( | |||
";DLNA.ORG_FLAGS={0}", | |||
DlnaMaps.FlagsToString(flagValue)); | |||
|
|||
ResponseProfile mediaProfile = profile.GetVideoMediaProfile( | |||
ResponseProfile? mediaProfile = profile.GetVideoMediaProfile( |
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.
why not just var
it?
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.
This looks like apply linting rules -> fix lints, in addition to nullability stuff and documentation (presumably linter-demanded).
I don't know the implications of Array.Empty<Type>()
-> []
, if any.
This is a rubber-stamp from my part, I've looked at all the changes, and nothing obvious popped out at me.
Visual inspection only, no testing done – but I did note that JPRM compiled it fine in CI.
return name switch | ||
return _disposed | ||
? throw new ObjectDisposedException(GetType().Name) | ||
: name switch |
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.
Is this linter recommended?
I personally don't think this makes the code easier to read.
No description provided.