mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 12:18:50 +02:00
FxCopAnalyzer fixes for Wox.Test (#7312)
* Added InvarientCulture info (CA1305: Specify IFormatProvider) * Removed underscore from method names (CA1707: Identifiers should not contain underscores) * Marked members as static (CA1822: Mark members as static) * Removed initialization for DummyTestClass::IsFunctionCalled (CA1805: Do not initialize unnecessarily) * Replaced Count with Any (CA1827: Do not use Count/LongCount when Any can be used) * Changed WoxTest::DummyTestClass to private (CA1034: Nested types should not be visible) * Suppressed warnings for uninstantiated internal classes used as TestFixtures (CA1812: Avoid uninstantiated internal classes) * Enabled FxCopAnalyzer for Wox.Test * Added suppression message for CA1812 in GlobalSuppressions.cs and removed inline supression messages (CA1812: Avoid uninstantiated internal classes) * Changed InvariantCulture to Ordinal where appropriate * Addressing comments: Updated justification for CA1812 in GlobalSuppressions.cs (Avoid uninstantiated internal classes)
This commit is contained in:
@@ -45,3 +45,6 @@ using System.Diagnostics.CodeAnalysis;
|
||||
[assembly: SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Microsoft.Templates.Core.Locations.JunctionNativeMethods.ThrowLastWin32Error(System.String)", Scope = "member", Target = "Microsoft.Templates.Core.Locations.JunctionNativeMethods.#InternalGetTarget(Microsoft.Win32.SafeHandles.SafeFileHandle)", Justification = "Only used for local generation")]
|
||||
[assembly: SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Microsoft.Templates.Core.Locations.JunctionNativeMethods.ThrowLastWin32Error(System.String)", Scope = "member", Target = "Microsoft.Templates.Core.Locations.JunctionNativeMethods.#OpenReparsePoint(System.String,Microsoft.Templates.Core.Locations.JunctionNativeMethods+EFileAccess)", Justification = "Only used for local generation")]
|
||||
[assembly: SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Windows.Documents.InlineCollection.Add(System.String)", Scope = "member", Target = "Microsoft.Templates.UI.Extensions.TextBlockExtensions.#OnSequentialFlowStepChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)", Justification = "No text here")]
|
||||
|
||||
// FxCop warning suppression for uninstantiated TestFixture classes
|
||||
[assembly: SuppressMessage("Microsoft.Performance", "CA1812: Avoid uninstantiated internal classes", Scope = "module", Justification = "CA1812 will be thrown for every file in the test project. This is mentioned here: dotnet/roslyn-analyzers#1830")]
|
||||
|
||||
Reference in New Issue
Block a user