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

Add rules, fix issues and cleanup #96

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Shadowghost
Copy link
Contributor

No description provided.

Comment on lines +1268 to +1276
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

This foreach loop immediately
maps its iteration variable to another variable
- consider mapping the sequence explicitly using '.Select(...)'.
src/Jellyfin.Plugin.Dlna.Model/DlnaDeviceProfile.cs Outdated Show resolved Hide resolved
src/Jellyfin.Plugin.Dlna.Model/IDeviceDiscovery.cs Outdated Show resolved Hide resolved
src/Jellyfin.Plugin.Dlna.Model/ResponseProfile.cs Outdated Show resolved Hide resolved
src/Jellyfin.Plugin.Dlna.Model/DlnaDeviceProfile.cs Outdated Show resolved Hide resolved
src/Jellyfin.Plugin.Dlna/Didl/DidlBuilder.cs Outdated Show resolved Hide resolved
src/Jellyfin.Plugin.Dlna/DlnaManager.cs Show resolved Hide resolved
src/Rssdp/HttpRequestParser.cs Fixed Show fixed Hide fixed
src/Rssdp/SsdpDevicePublisher.cs Fixed Show fixed Hide fixed
src/Rssdp/SsdpDevicePublisher.cs Fixed Show fixed Hide fixed
src/.editorconfig Outdated Show resolved Hide resolved
Copy link
Member

@oddstr13 oddstr13 left a 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.

src/Jellyfin.Plugin.Dlna/PlayTo/PlayToController.cs Outdated Show resolved Hide resolved
@Bond-009
Copy link
Member

Shouldn't we use the new .editorconfig of the main repo instead of the ruleset file?

@Shadowghost
Copy link
Contributor Author

Sure, I created this PR before migrating it.

Copy link
Member

@Bond-009 Bond-009 left a comment

Choose a reason for hiding this comment

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

Mostly comments that can be improved

src/Jellyfin.Plugin.Dlna.Model/ContentFeatureBuilder.cs Outdated Show resolved Hide resolved
src/Jellyfin.Plugin.Dlna.Model/DlnaFlags.cs Outdated Show resolved Hide resolved
src/Jellyfin.Plugin.Dlna.Model/DlnaMaps.cs Outdated Show resolved Hide resolved
src/Jellyfin.Plugin.Dlna.Model/IDeviceDiscovery.cs Outdated Show resolved Hide resolved
src/Jellyfin.Plugin.Dlna/PlayTo/PlayToController.cs Outdated Show resolved Hide resolved
src/Jellyfin.Plugin.Dlna/PlayTo/PlayToController.cs Outdated Show resolved Hide resolved
src/Jellyfin.Plugin.Dlna/PlayTo/TransportState.cs Outdated Show resolved Hide resolved
src/Jellyfin.Plugin.Dlna/Service/BaseControlHandler.cs Outdated Show resolved Hide resolved
src/Jellyfin.Plugin.Dlna/Service/BaseService.cs Outdated Show resolved Hide resolved
/// <param name="notificationType">The notification type.</param>
/// <param name="requestedTimeoutString">The requested timeout string.</param>
/// <param name="callbackUrl">The callback URL.</param>
/// <returns>EventSubscriptionResponse.</returns>
Copy link
Member

Choose a reason for hiding this comment

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

Missed this one

/// <param name="notificationType">The notification type.</param>
/// <param name="requestedTimeoutString">The requested timeout string.</param>
/// <param name="callbackUrl">The callback URL.</param>
/// <returns>EventSubscriptionResponse.</returns>
Copy link
Member

Choose a reason for hiding this comment

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

And this one

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.

5 participants