mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 10:16:24 +02:00
Remove obsolete fxCop suppressions and references (#19905)
This commit is contained in:
committed by
GitHub
parent
9100e03be9
commit
733041ba2b
@@ -4,7 +4,6 @@
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO.Abstractions;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
|
||||
@@ -74,7 +73,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
// Update Settings file folder:
|
||||
_settingsConfigFileFolder = configFileSubfolder;
|
||||
|
||||
// Using Invariant here as these are internal strings and fxcop
|
||||
// Using Invariant here as these are internal strings and the analyzer
|
||||
// expects strings to be normalized to uppercase. While the theme names
|
||||
// are represented in lowercase everywhere else, we'll use uppercase
|
||||
// normalization for switch statements
|
||||
@@ -288,12 +287,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
// FxCop suggests marking this member static, but it is accessed through
|
||||
// an instance in autogenerated files (GeneralPage.g.cs) and will break
|
||||
// the file if modified
|
||||
#pragma warning disable CA1822 // Mark members as static
|
||||
public string PowerToysVersion
|
||||
#pragma warning restore CA1822 // Mark members as static
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
@@ -109,18 +109,13 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning disable CA2227 // Collection properties should be read only
|
||||
public ObservableCollection<ImageSize> Sizes
|
||||
#pragma warning restore CA2227 // Collection properties should be read only
|
||||
{
|
||||
get
|
||||
{
|
||||
return _advancedSizes;
|
||||
}
|
||||
|
||||
// FxCop demands collection properties to be read-only, but this
|
||||
// setter is used in autogenerated files (ImageResizerPage.g.cs)
|
||||
// and replacing the setter with its own method will break the file
|
||||
set
|
||||
{
|
||||
SavesImageSizes(value);
|
||||
|
||||
Reference in New Issue
Block a user