mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
[PR #12628] Fix some analyzer IDisposable warnings #13117
Labels
No labels
area:database
awaiting-feedback
backend
blocked
breaking change: web api
bug
build
ci
confirmed
discussion needed
dotnet future
downstream
duplicate
EFjellyfin.db
enhancement
feature
future
github-actions
good first issue
hdr
help wanted
invalid
investigation
librarydb
live-tv
lyrics
media playback
music
needs testing
nuget
performance
platform
pull-request
question
regression
release critical
requires-web
roadmap
security
security
stale
support
syncplay
ui & ux
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: starred/jellyfin#13117
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/12628
Author: @fice-t
Created: 9/11/2024
Status: 🔄 Open
Base:
master← Head:disposable📝 Commits (5)
51de8c2Enable CA2213 analyzer rule as error2e3946dFix several small CA2000 violationse9923daPass null instead of empty array to HttpClientd7b854aFix several CA2000 violations in tests5d1ad51Enable more rules for IDisposable as errors📊 Changes
14 files changed (+97 additions, -29 deletions)
View changed files
📝
Emby.Server.Implementations/ApplicationHost.cs(+2 -2)📝
Jellyfin.Api/Controllers/VideosController.cs(+1 -1)📝
MediaBrowser.MediaEncoding/Attachments/AttachmentExtractor.cs(+3 -2)📝
jellyfin.ruleset(+6 -0)📝
tests/Jellyfin.LiveTv.Tests/HdHomerunHostTests.cs(+17 -2)📝
tests/Jellyfin.LiveTv.Tests/Listings/XmlTvListingsProviderTests.cs(+17 -2)📝
tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeExternalSourcesTests.cs(+1 -1)📝
tests/Jellyfin.MediaEncoding.Tests/Subtitles/SubtitleEncoderTests.cs(+1 -1)📝
tests/Jellyfin.Server.Implementations.Tests/HttpServer/WebSocketConnectionTests.cs(+12 -4)📝
tests/Jellyfin.Server.Implementations.Tests/Plugins/PluginManagerTests.cs(+16 -9)📝
tests/Jellyfin.Server.Implementations.Tests/Updates/InstallationManagerTests.cs(+18 -2)📝
tests/Jellyfin.Server.Integration.Tests/AuthHelper.cs(+1 -1)📝
tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs(+1 -1)📝
tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs(+1 -1)📄 Description
I haven't had much experience with C#, so I decided to start with fixing some of what the IDE analyzers were yelling about.
There are still remaining CA2000 violations, which fall into several categories:
SKBitMap)(await) usingis appropriate (such asCancellationTokenSourceand the logStreamfor FFmpeg)FromBase64Transform,Socket)ControllerBase.Filedisposes itsStreamargument, and something weird withGetBitmapFromSvgbeing part of a conditional expression).Changes
These bring down the number of CA2000 violations that VS reports from 47 to 22, as well as remove the only CA2213 violation and add CA2213+CA2216 as build errors.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.