Add Jellyfin.CodeAnalysis and analyzers to all projects

Integrated Jellyfin.CodeAnalysis as a project reference across core and test projects. Added centrally managed code analysis and style enforcement packages (IDisposableAnalyzers, Microsoft.CodeAnalysis.BannedApiAnalyzers, SerilogAnalyzer, SmartAnalyzers.MultithreadingAnalyzer, StyleCop.Analyzers) to all affected projects. Updated dependency graphs, asset files, and build scripts to ensure analyzers run during builds, enforcing consistent code quality and style rules throughout the codebase. Removed custom warning properties to rely on analyzer enforcement.
This commit is contained in:
2026-02-23 07:03:54 -05:00
parent 8d39eb77e6
commit ede6904433
181 changed files with 22265 additions and 526 deletions
@@ -57,6 +57,13 @@
"netstandard2.0": {
"targetAlias": "netstandard2.0",
"dependencies": {
"IDisposableAnalyzers": {
"include": "Runtime, Build, Native, ContentFiles, Analyzers",
"suppressParent": "All",
"target": "Package",
"version": "[4.0.8, )",
"versionCentrallyManaged": true
},
"Jellyfin.Sdk": {
"target": "Package",
"version": "[2025.10.21, )",
@@ -68,6 +75,13 @@
"version": "[3.11.0, )",
"versionCentrallyManaged": true
},
"Microsoft.CodeAnalysis.BannedApiAnalyzers": {
"include": "Runtime, Build, Native, ContentFiles, Analyzers",
"suppressParent": "All",
"target": "Package",
"version": "[4.14.0, )",
"versionCentrallyManaged": true
},
"Microsoft.CodeAnalysis.CSharp": {
"suppressParent": "All",
"target": "Package",
@@ -79,6 +93,24 @@
"target": "Package",
"version": "[2.0.3, )",
"autoReferenced": true
},
"SerilogAnalyzer": {
"suppressParent": "All",
"target": "Package",
"version": "[0.15.0, )",
"versionCentrallyManaged": true
},
"SmartAnalyzers.MultithreadingAnalyzer": {
"suppressParent": "All",
"target": "Package",
"version": "[1.1.31, )",
"versionCentrallyManaged": true
},
"StyleCop.Analyzers": {
"suppressParent": "All",
"target": "Package",
"version": "[1.2.0-beta.556, )",
"versionCentrallyManaged": true
}
},
"centralPackageVersions": {
@@ -692,6 +724,9 @@
"net11.0": {
"targetAlias": "net11.0",
"projectReferences": {
"E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.CodeAnalysis\\Jellyfin.CodeAnalysis.csproj": {
"projectPath": "E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.CodeAnalysis\\Jellyfin.CodeAnalysis.csproj"
},
"E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.MediaEncoding.Keyframes\\Jellyfin.MediaEncoding.Keyframes.csproj": {
"projectPath": "E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.MediaEncoding.Keyframes\\Jellyfin.MediaEncoding.Keyframes.csproj"
}
@@ -1444,6 +1444,7 @@
},
"projectFileDependencyGroups": {
"net11.0": [
"Jellyfin.CodeAnalysis >= 1.0.0",
"Jellyfin.MediaEncoding.Keyframes >= 10.11.0",
"Jellyfin.Sdk >= 2025.10.21",
"Microsoft.CodeAnalysis.BannedApiAnalyzers >= 4.14.0",
@@ -1490,6 +1491,9 @@
"net11.0": {
"targetAlias": "net11.0",
"projectReferences": {
"E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.CodeAnalysis\\Jellyfin.CodeAnalysis.csproj": {
"projectPath": "E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.CodeAnalysis\\Jellyfin.CodeAnalysis.csproj"
},
"E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.MediaEncoding.Keyframes\\Jellyfin.MediaEncoding.Keyframes.csproj": {
"projectPath": "E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.MediaEncoding.Keyframes\\Jellyfin.MediaEncoding.Keyframes.csproj"
}
@@ -1,6 +1,6 @@
{
"version": 2,
"dgSpecHash": "Zd3h3rZ7uhE=",
"dgSpecHash": "0nvUEzLEN94=",
"success": true,
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\tests\\Jellyfin.MediaEncoding.Keyframes.Tests\\Jellyfin.MediaEncoding.Keyframes.Tests.csproj",
"expectedPackageFiles": [