mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #12424] [CLOSED] Disable CA1008 for ImageOrientation.cs; Remove CA1815 for ImageDimensions.cs #13191
Reference in New Issue
Block a user
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/12424
Author: @mikler
Created: 8/11/2024
Status: ❌ Closed
Base:
master← Head:mikler/address-warnings-1📝 Commits (3)
ae2ecf4Disable CA1008 for ImageOrientation.cs8587723Remove CA1815 for ImageDimensions.cs4a3528eMove pragma to disable CA1008 warning to the top📊 Changes
2 files changed (+25 additions, -3 deletions)
View changed files
📝
MediaBrowser.Model/Drawing/ImageDimensions.cs(+24 -3)📝
MediaBrowser.Model/Drawing/ImageOrientation.cs(+1 -0)📄 Description
Disable CA1008 for ImageOrientation.cs; Remove CA1815 for ImageDimensions.cs
Changes
As per the rule CA1008 documentation
"When to suppress warnings
Do not suppress a warning from this rule except for flags-attributed enumerations that have previously shipped."
And this enum has already been shipped. And default value is handed in the GetSKEncodedOrigin() method.
Added comment RE the same.
For CA1815 for ImageDimensions.cs
Added relevant operators, hash methods and implemented IEquatable to address the CA1815 rule.
Ran unit tests.
Issues
Fixes #2149
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.