Eliminate All Compiler Warnings In Solution #1137

Open
opened 2025-12-21 18:07:38 +01:00 by backuprepo · 12 comments
Owner

Originally created by @mark-monteiro on GitHub (Dec 13, 2019).

This is a general ticket to track progress on eliminating all warnings in the solution source code, including enabling missing analyzers and converting warnings to errors in release builds. @Bond-009, as I understand, you have already been working on this for a while. I thought I would start helping out with this task and we (and anyone else) can coordinate progress here.

The table below summarizes the progress on this task at the current HEAD commit on master:

Project Warnings FxCop Analyzer StyleCop Analyzer Serilog Analyzer Multithreading Analyzer Warnings As Errors
DvdLib
  • [x]
  • [ ]
  • [ ]
  • [ ]
  • [ ]
  • [x]
Emby.Dlna
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
Emby.Drawing
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
Emby.Naming
  • [x]
  • [ ]
  • [x]
  • [x]
  • [x]
  • [x]
Emby.Notifications
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
Emby.Photos
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
Emby.Server.Implementations
  • [ ] (644 Warnings)
  • [x]
  • [x]
  • [x]
  • [x]
  • [ ]
Jellyfin.Api
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
Jellyfin.Data
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
Jellyfin.Drawing.Skia
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
Jellyfin.Server
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
Jellyfin.Server.Implementations
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
MediaBrowser.Common
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
MediaBrowser.Controller
  • [ ] (1053 Warnings)
  • [x]
  • [x]
  • [x]
  • [x]
  • [ ]
MediaBrowser.LocalMetadata
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
MediaBrowser.MediaEncoding
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
MediaBrowser.Model
  • [ ] (2132 Warnings)
  • [x]
  • [x]
  • [x]
  • [x]
  • [ ]
MediaBrowser.Providers
  • [ ] (538 Warnings)
  • [x]
  • [x]
  • [x]
  • [x]
  • [ ]
MediaBrowser.XbmcMetadata
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
RSSDP
  • [x]
  • [ ]
  • [ ]
  • [ ]
  • [ ]
  • [x]
Jellyfin.Api.Tests
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
Jellyfin.Common.Tests
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
Jellyfin.Controller.Tests
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
Jellyfin.MediaEncoding.Tests
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
Jellyfin.Model.Tests
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
Jellyfin.Naming.Tests
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
Jellyfin.Server.Implementations.Tests
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
MediaBrowser.Api.Tests
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
  • [x]
Total 4367 Warnings
Originally created by @mark-monteiro on GitHub (Dec 13, 2019). This is a general ticket to track progress on eliminating all warnings in the solution source code, including enabling missing analyzers and converting warnings to errors in release builds. @Bond-009, as I understand, you have already been working on this for a while. I thought I would start helping out with this task and we (and anyone else) can coordinate progress here. The table below summarizes the progress on this task at the current HEAD commit on master: |Project|Warnings|FxCop Analyzer|StyleCop Analyzer|Serilog Analyzer|Multithreading Analyzer|Warnings As Errors| |-------|--------|--------------|-----------------|----------------|-----------------------|------------------| |DvdLib| <ul><li>[x] </li></ul>| <ul><li>[ ] </li></ul>|<ul><li>[ ] </li></ul>|<ul><li>[ ] </li></ul>|<ul><li>[ ] </li></ul>|<ul><li>[x] </li></ul> |Emby.Dlna| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |Emby.Drawing| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |Emby.Naming| <ul><li>[x] </li></ul>| <ul><li>[ ] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |Emby.Notifications| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |Emby.Photos| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |Emby.Server.Implementations| <ul><li>[ ] (644 Warnings)</li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[ ] </li></ul> |Jellyfin.Api| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |Jellyfin.Data| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |Jellyfin.Drawing.Skia| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |Jellyfin.Server| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |Jellyfin.Server.Implementations| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |MediaBrowser.Common| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |MediaBrowser.Controller| <ul><li>[ ] (1053 Warnings)</li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[ ] </li></ul> |MediaBrowser.LocalMetadata| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |MediaBrowser.MediaEncoding| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |MediaBrowser.Model| <ul><li>[ ] (2132 Warnings)</li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[ ] </li></ul> |MediaBrowser.Providers| <ul><li>[ ] (538 Warnings)</li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[ ] </li></ul> |MediaBrowser.XbmcMetadata| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |RSSDP| <ul><li>[x] </li></ul>| <ul><li>[ ] </li></ul>|<ul><li>[ ] </li></ul>|<ul><li>[ ] </li></ul>|<ul><li>[ ] </li></ul>|<ul><li>[x] </li></ul> |Jellyfin.Api.Tests| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |Jellyfin.Common.Tests| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |Jellyfin.Controller.Tests| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |Jellyfin.MediaEncoding.Tests| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |Jellyfin.Model.Tests| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |Jellyfin.Naming.Tests| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |Jellyfin.Server.Implementations.Tests|<ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |MediaBrowser.Api.Tests| <ul><li>[x] </li></ul>| <ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul>|<ul><li>[x] </li></ul> |Total|4367 Warnings
backuprepo added the
good first issue
confirmed
labels 2025-12-21 18:07:38 +01:00
Author
Owner

@jvoisin commented on GitHub (Jun 26, 2020):

Would it be possible to add LGTM.com to the list? It found a lot of issues.

@jvoisin commented on GitHub (Jun 26, 2020): Would it be possible to add [LGTM.com]( https://lgtm.com/projects/g/jellyfin/jellyfin?mode=list ) to the list? It found a lot of issues.
Author
Owner

@dcparga commented on GitHub (Oct 11, 2020):

Hey guys, I'm just wondering. I'm seeing 4028 warnings when building the solution. Some of the warnings are like "don't use space after new keyword", or others like to move types to their own file. I assume any warning fixed will be welcome, right?

@dcparga commented on GitHub (Oct 11, 2020): Hey guys, I'm just wondering. I'm seeing 4028 warnings when building the solution. Some of the warnings are like "don't use space after new keyword", or others like to move types to their own file. I assume any warning fixed will be welcome, right?
Author
Owner

@dkanada commented on GitHub (Oct 11, 2020):

You're correct, anything that shows a warning is fair game for a pull request.

@dkanada commented on GitHub (Oct 11, 2020): You're correct, anything that shows a warning is fair game for a pull request.
Author
Owner

@stale[bot] commented on GitHub (Feb 9, 2021):

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@stale[bot] commented on GitHub (Feb 9, 2021): This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on [Matrix or Social Media](https://docs.jellyfin.org/general/getting-help.html).
Author
Owner

@Christian-Oleson commented on GitHub (Sep 30, 2022):

I'm willing to help out with this if you are looking for help

@Christian-Oleson commented on GitHub (Sep 30, 2022): I'm willing to help out with this if you are looking for help
Author
Owner

@jbatt33 commented on GitHub (Mar 30, 2023):

I just built Jellyfin and I'm not seeing any warnings. Is this bug fixed or am I looking at the wrong repo. Maybe I need to build harder.

@jbatt33 commented on GitHub (Mar 30, 2023): I just built Jellyfin and I'm not seeing any warnings. Is this bug fixed or am I looking at the wrong repo. Maybe I need to build harder.
Author
Owner

@Bond-009 commented on GitHub (Mar 30, 2023):

@jbatt33 are you building in debug mode?

@Bond-009 commented on GitHub (Mar 30, 2023): @jbatt33 are you building in debug mode?
Author
Owner

@jbatt33 commented on GitHub (Mar 30, 2023):

Yes, I did both debug and release builds of the jellyfin under VS 2022 and did not get any warnings or errors, but get 3 messages:
image

@jbatt33 commented on GitHub (Mar 30, 2023): Yes, I did both debug and release builds of the jellyfin under VS 2022 and did not get any warnings or errors, but get 3 messages: ![image](https://user-images.githubusercontent.com/41477628/228947738-1b5a13eb-1ea8-45b7-ae05-ad1a9bad2438.png)
Author
Owner

@Bond-009 commented on GitHub (Mar 31, 2023):

I think it's an issue with dotnet, if you remove <CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors> from the projects that have it you'll get build errors

@Bond-009 commented on GitHub (Mar 31, 2023): I think it's an issue with dotnet, if you remove `<CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors>` from the projects that have it you'll get build errors
Author
Owner

@jbatt33 commented on GitHub (Mar 31, 2023):

Thanks, I deleted that line from the project file and it's working as expected. I'm going to see if I can tackle any of these.

@jbatt33 commented on GitHub (Mar 31, 2023): Thanks, I deleted that line from the project file and it's working as expected. I'm going to see if I can tackle any of these.
Author
Owner

@LoremFooBar commented on GitHub (Sep 27, 2023):

I'd like to try to clear some of these warnings. I already started with the simpler ones. Some warnings require refactoring that is easy to do, but hard to determine whether they are breaking changes. I'd like to try to tackle these as well later on.

@LoremFooBar commented on GitHub (Sep 27, 2023): I'd like to try to clear some of these warnings. I already started with the simpler ones. Some warnings require refactoring that is easy to do, but hard to determine whether they are breaking changes. I'd like to try to tackle these as well later on.
Author
Owner

@gsedubun commented on GitHub (May 1, 2024):

I'd like to try to clear some of these.

@gsedubun commented on GitHub (May 1, 2024): I'd like to try to clear some of these.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#1137
No description provided.