diff --git a/src/Microsoft.DotNet.Wpf/src/.editorconfig b/src/Microsoft.DotNet.Wpf/src/.editorconfig index 02779602059..7b0602a7b50 100644 --- a/src/Microsoft.DotNet.Wpf/src/.editorconfig +++ b/src/Microsoft.DotNet.Wpf/src/.editorconfig @@ -212,9 +212,6 @@ dotnet_diagnostic.IDE0074.severity = suggestion # IDE0075: Simplify conditional expression dotnet_diagnostic.IDE0075.severity = suggestion -# IDE0077: Avoid legacy global suppression format -dotnet_diagnostic.IDE0077.severity = suggestion - # IDE0078: Use pattern matching dotnet_diagnostic.IDE0078.severity = suggestion diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/GlobalSuppressions.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/GlobalSuppressions.cs index 7835302bf08..7e9387c58a7 100644 --- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/GlobalSuppressions.cs +++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/GlobalSuppressions.cs @@ -1,79 +1,71 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -#nullable disable - -#nullable disable// This file is used by Code Analysis to maintain SuppressMessage +// This file is used by Code Analysis to maintain SuppressMessage // attributes that are applied to this project. // Project-level suppressions either have no target or are given // a specific target and scoped to a namespace, type, member, etc. using System.Diagnostics.CodeAnalysis; -#region Microsoft.Design Suppressions +// Microsoft.Design Suppressions [assembly: SuppressMessage("Microsoft.Design", "CA1064:Exceptions should be public", Justification = "Exception is internal only", Scope = "type", Target = "~T:MS.Internal.Xaml.Parser.GenericTypeNameParser.TypeNameParserException")] [assembly: SuppressMessage("Microsoft.Design", "CA1032:Implement standard exception constructors", Justification = "Exception is internal only", Scope = "type", Target = "~T:MS.Internal.Xaml.Parser.GenericTypeNameParser.TypeNameParserException")] -[assembly: SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32", Scope = "type", Target = "System.Xaml.Schema.XamlCollectionKind", Justification = "Our measurements showed this type provided improved spacial complexity.")] -[assembly: SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32", Scope = "type", Target = "System.Xaml.XamlNodeType", Justification = "Our measurements showed this type provided improved spacial complexity.")] -[assembly: SuppressMessage("Microsoft.Design", "CA1036:OverrideMethodsOnComparableTypes", Scope = "type", Target = "System.Xaml.Schema.ReferenceEqualityTuple`2", Justification = "Internal Only")] -[assembly: SuppressMessage("Microsoft.Design", "CA1036:OverrideMethodsOnComparableTypes", Scope = "type", Target = "System.Xaml.Schema.ReferenceEqualityTuple`3", Justification = "Internal Only")] +[assembly: SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32", Scope = "type", Target = "~T:System.Xaml.Schema.XamlCollectionKind", Justification = "Our measurements showed this type provided improved spacial complexity.")] +[assembly: SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32", Scope = "type", Target = "~T:System.Xaml.XamlNodeType", Justification = "Our measurements showed this type provided improved spacial complexity.")] +[assembly: SuppressMessage("Microsoft.Design", "CA1036:OverrideMethodsOnComparableTypes", Scope = "type", Target = "~T:System.Xaml.Schema.ReferenceEqualityTuple`2", Justification = "Internal Only")] +[assembly: SuppressMessage("Microsoft.Design", "CA1036:OverrideMethodsOnComparableTypes", Scope = "type", Target = "~T:System.Xaml.Schema.ReferenceEqualityTuple`3", Justification = "Internal Only")] [assembly: SuppressMessage("Microsoft.Design", "CA1063:ImplementIDisposableCorrectly", Justification = "Not changing public API surface for .NET Core 3 release", Scope = "member", Target = "~M:System.Xaml.XamlWriter.System#IDisposable#Dispose")] [assembly: SuppressMessage("Microsoft.Design", "CA1031:Do not catch general exception types", Justification = "Don't want render thread to crash", Scope = "member", Target = "~M:System.Xaml.XamlBackgroundReader.XamlReaderThreadStart(System.Object)")] [assembly: SuppressMessage("Microsoft.Design", "CA1031:Do not catch general exception types", Justification = "Finalizers shouldn't throw", Scope = "member", Target = "~M:System.Xaml.XamlSchemaContext.Finalize")] -#endregion -#region Microsoft.Performance suppressions -[assembly: SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Scope = "type", Target = "MS.Internal.Xaml.Context.ObjectWriterFrame", Justification = "Non-Breaking")] +// Microsoft.Performance suppressions +[assembly: SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Scope = "type", Target = "~T:MS.Internal.Xaml.Context.ObjectWriterFrame", Justification = "Non-Breaking")] // New since v4 RTM: // this is used by subclasses, bad FxCop detection -[assembly: SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Scope = "type", Target = "System.Xaml.MS.Impl.FrugalObjectList`1+Compacter", Justification = "Non-Breaking")] -#endregion +[assembly: SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Scope = "type", Target = "~T:System.Xaml.MS.Impl.FrugalObjectList`1.Compacter", Justification = "Non-Breaking")] -#region Microsoft.Naming Suppressions -[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Xaml.XamlReader.#IsEof", MessageId = "Eof", Justification = "Review Eof")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Scope = "type", Target = "System.Xaml.XamlNodeQueue", Justification = "This is unnecessarily limiting.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Scope = "member", Target = "System.Windows.Markup.PropertyDefinition.#Type", Justification = "Makes sense for our problem domain.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Scope = "member", Target = "System.Xaml.XamlMember.#Type", Justification = "Makes sense for our problem domain.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Scope = "member", Target = "System.Xaml.XamlReader.#Type", Justification = "Makes sense for our problem domain.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", Scope = "member", Target = "System.Xaml.XamlReader.#Namespace", MessageId = "Namespace", Justification = "Works for our problem domain.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Scope = "member", Target = "System.Windows.Markup.ArrayExtension.#Type", Justification = "Kept for compatibility.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Scope = "member", Target = "System.Windows.Markup.TypeExtension.#Type", Justification = "Kept for compatibility.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Scope = "member", Target = "System.Windows.Markup.NameScopePropertyAttribute.#Type", Justification = "Kept for compatibility.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Uid", Scope = "type", Target = "System.Windows.Markup.UidPropertyAttribute", Justification = "Short for unique identifiers.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Uid", Scope = "member", Target = "System.Xaml.XamlLanguage.#Uid", Justification = "Short for unique identifiers.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Namescope", Scope = "member", Target = "System.Xaml.XamlObjectWriterSettings.#RegisterNamesOnExternalNamescope", Justification ="Will require changes in public API contract.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Uids", Scope = "member", Target = "System.Xaml.XamlReaderSettings.#IgnoreUidsOnPropertyElements", Justification = "Short for unique identifiers.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Arity", Scope = "member", Target = "System.Xaml.XamlSchemaContext.#SupportMarkupExtensionsWithDuplicateArity", Justification ="Will require changes in public API contract.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Arity", Scope = "member", Target = "System.Xaml.XamlSchemaContextSettings.#SupportMarkupExtensionsWithDuplicateArity", Justification ="Will require changes in public API contract.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "Arity", Scope = "resource", Target = "ExceptionStringTable.resources", Justification="Alligns with other instances of same resource.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#String", Justification="Will require changes in public API contract.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Double", Justification="Will require changes in public API contract.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Int32", Justification="Will require changes in public API contract.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Object", Justification="Will require changes in public API contract.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Char", Justification="Will require changes in public API contract.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Single", Justification="Will require changes in public API contract.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Int16", Justification="Will require changes in public API contract.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Int64", Justification="Will require changes in public API contract.")] -[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "System.Xaml.XamlLanguage.#Decimal", Justification="Will require changes in public API contract.")] -#endregion +// Microsoft.Naming Suppressions +[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~P:System.Xaml.XamlReader.IsEof", MessageId = "Eof", Justification = "Review Eof")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Scope = "type", Target = "~T:System.Xaml.XamlNodeQueue", Justification = "This is unnecessarily limiting.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Scope = "member", Target = "~P:System.Windows.Markup.PropertyDefinition.Type", Justification = "Makes sense for our problem domain.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Scope = "member", Target = "~P:System.Xaml.XamlMember.Type", Justification = "Makes sense for our problem domain.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Scope = "member", Target = "~P:System.Xaml.XamlReader.Type", Justification = "Makes sense for our problem domain.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", Scope = "member", Target = "~P:System.Xaml.XamlReader.Namespace", MessageId = "Namespace", Justification = "Works for our problem domain.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Scope = "member", Target = "~P:System.Windows.Markup.ArrayExtension.Type", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Scope = "member", Target = "~P:System.Windows.Markup.TypeExtension.Type", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Scope = "member", Target = "~P:System.Windows.Markup.NameScopePropertyAttribute.Type", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Uid", Scope = "type", Target = "~T:System.Windows.Markup.UidPropertyAttribute", Justification = "Short for unique identifiers.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Uid", Scope = "member", Target = "~P:System.Xaml.XamlLanguage.Uid", Justification = "Short for unique identifiers.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Namescope", Scope = "member", Target = "~P:System.Xaml.XamlObjectWriterSettings.RegisterNamesOnExternalNamescope", Justification = "Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Uids", Scope = "member", Target = "~P:System.Xaml.XamlReaderSettings.IgnoreUidsOnPropertyElements", Justification = "Short for unique identifiers.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Arity", Scope = "member", Target = "~P:System.Xaml.XamlSchemaContext.SupportMarkupExtensionsWithDuplicateArity", Justification = "Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Arity", Scope = "member", Target = "~P:System.Xaml.XamlSchemaContextSettings.SupportMarkupExtensionsWithDuplicateArity", Justification = "Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "Arity", Scope = "resource", Target = "ExceptionStringTable.resources", Justification = "Alligns with other instances of same resource.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "~P:System.Xaml.XamlLanguage.String", Justification = "Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "~P:System.Xaml.XamlLanguage.Double", Justification = "Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "~P:System.Xaml.XamlLanguage.Int32", Justification = "Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "~P:System.Xaml.XamlLanguage.Object", Justification = "Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "~P:System.Xaml.XamlLanguage.Char", Justification = "Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "~P:System.Xaml.XamlLanguage.Single", Justification = "Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "~P:System.Xaml.XamlLanguage.Int16", Justification = "Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "~P:System.Xaml.XamlLanguage.Int64", Justification = "Will require changes in public API contract.")] +[assembly: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Scope = "member", Target = "~P:System.Xaml.XamlLanguage.Decimal", Justification = "Will require changes in public API contract.")] -#region Microsoft.Usage Suppressions -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.ThreeItemList`1.Promote(System.Xaml.MS.Impl.ThreeItemList`1):System.Void", Justification = "Kept for compatibility.")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.ThreeItemList`1.SetCount(System.Int32):System.Void", Justification = "Kept for compatibility.")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.ThreeItemList`1.Promote(System.Xaml.MS.Impl.FrugalListBase`1):System.Void", Justification = "Kept for compatibility.")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.ArrayItemList`1.Promote(System.Xaml.MS.Impl.SixItemList`1):System.Void", Justification = "Kept for compatibility.")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.ArrayItemList`1.SetCount(System.Int32):System.Void", Justification = "Kept for compatibility.")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.SingleItemList`1.SetCount(System.Int32):System.Void", Justification = "Kept for compatibility.")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.SixItemList`1.Promote(System.Xaml.MS.Impl.SixItemList`1):System.Void", Justification = "Kept for compatibility.")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.SixItemList`1.Promote(System.Xaml.MS.Impl.ThreeItemList`1):System.Void", Justification = "Kept for compatibility.")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.SixItemList`1.SetCount(System.Int32):System.Void", Justification = "Kept for compatibility.")] -[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Xaml.MS.Impl.SixItemList`1.Promote(System.Xaml.MS.Impl.FrugalListBase`1):System.Void", Justification = "Kept for compatibility.")] +// Microsoft.Usage Suppressions +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "~M:System.Xaml.MS.Impl.ThreeItemList`1.Promote(System.Xaml.MS.Impl.ThreeItemList`1)", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "~M:System.Xaml.MS.Impl.ThreeItemList`1.SetCount(System.Int32)", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "~M:System.Xaml.MS.Impl.ThreeItemList`1.Promote(System.Xaml.MS.Impl.FrugalListBase{`0})", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "~M:System.Xaml.MS.Impl.ArrayItemList`1.Promote(System.Xaml.MS.Impl.SixItemList{`0})", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "~M:System.Xaml.MS.Impl.ArrayItemList`1.SetCount(System.Int32)", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "~M:System.Xaml.MS.Impl.SingleItemList`1.SetCount(System.Int32)", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "~M:System.Xaml.MS.Impl.SixItemList`1.Promote(System.Xaml.MS.Impl.SixItemList`1)", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "~M:System.Xaml.MS.Impl.SixItemList`1.Promote(System.Xaml.MS.Impl.ThreeItemList{`0})", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "~M:System.Xaml.MS.Impl.SixItemList`1.SetCount(System.Int32)", Justification = "Kept for compatibility.")] +[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "~M:System.Xaml.MS.Impl.SixItemList`1.Promote(System.Xaml.MS.Impl.FrugalListBase{`0})", Justification = "Kept for compatibility.")] -#endregion -#region Microsoft.Reliablity Suppressions -[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", MessageId = "System.Reflection.Assembly.LoadFile", Scope = "member", Target = "System.Xaml.ReflectionHelper.#LoadAssemblyHelper(System.String,System.String)", Justification = "Kept for compatibility.")] -[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", MessageId = "System.Reflection.Assembly.LoadWithPartialName", Scope = "member", Target = "System.Xaml.XamlSchemaContext.#ResolveAssembly(System.String)", Justification = "Need to support load of assemblies from GAC by short name.")] -#endregion +// Microsoft.Reliablity Suppressions +[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", MessageId = "System.Reflection.Assembly.LoadFile", Scope = "member", Target = "~M:System.Xaml.ReflectionHelper.LoadAssemblyHelper(System.String,System.String)~System.Reflection.Assembly", Justification = "Kept for compatibility.")] +[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", MessageId = "System.Reflection.Assembly.LoadWithPartialName", Scope = "member", Target = "~M:System.Xaml.XamlSchemaContext.ResolveAssembly(System.String)~System.Reflection.Assembly", Justification = "Need to support load of assemblies from GAC by short name.")] diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/GlobalSuppressions.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/GlobalSuppressions.cs new file mode 100644 index 00000000000..20934f3affb --- /dev/null +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/GlobalSuppressions.cs @@ -0,0 +1,156 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Diagnostics.CodeAnalysis; + +// We don't own these names; the OS does +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.AbntC2")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.NumPad0")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.NumPad2")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.NumPad5")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.NumPad7")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.NumPad9")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.NumPad1")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.DbeSbcsChar")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.NumPad3")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.NumPad8")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.JunjaMode")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.OemEnlw")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.DbeDbcsChar")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.NumPad4")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.NumLock")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.NumPad6")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.EraseEof")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Input.Key.AbntC1")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~M:System.Windows.Automation.TransformPattern.Move(System.Double,System.Double)", MessageId = "0#x")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~M:System.Windows.Automation.TransformPattern.Move(System.Double,System.Double)", MessageId = "1#y")] +[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "~M:MS.Internal.Automation.Misc.TryMsgWaitForMultipleObjects(Microsoft.Win32.SafeHandles.SafeWaitHandle,System.Boolean,System.Int32,System.Int32,System.Int32@)~System.Int32", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] +// The type that is passed is correct +[module: SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Scope = "member", Target = "~M:System.Windows.Automation.Provider.AutomationInteropProvider.RaiseAutomationEvent(System.Windows.Automation.AutomationEvent,System.Windows.Automation.Provider.IRawElementProviderSimple,System.Windows.Automation.AutomationEventArgs)")] +[module: SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Scope = "member", Target = "~M:System.Windows.Automation.Automation.PropertyName(System.Windows.Automation.AutomationProperty)~System.String")] +[module: SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Scope = "member", Target = "~M:System.Windows.Automation.Automation.PatternName(System.Windows.Automation.AutomationPattern)~System.String")] +[module: SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Scope = "type", Target = "~T:System.Windows.Automation.AutomationFocusChangedEventArgs")] +// The rule doesn't apply to non-public namespaces +[module: SuppressMessage("Microsoft.MSInternal", "CA904:DeclareTypesInMicrosoftOrSystemNamespace", Scope = "namespace", Target = "~N:MS.Internal")] +[module: SuppressMessage("Microsoft.MSInternal", "CA904:DeclareTypesInMicrosoftOrSystemNamespace", Scope = "namespace", Target = "~N:MS.Win32")] +// Reviewed by WinFX team and this case is OK +[module: SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Scope = "type", Target = "~T:System.Windows.Automation.Text.FlowDirections")] +// Reviewed by atgarch and these enums are OK +[module: SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames", Scope = "type", Target = "~T:System.Windows.Automation.TreeScope")] +[module: SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames", Scope = "type", Target = "~T:System.Windows.Automation.ClientSideProviderMatchIndicator")] +[module: SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames", Scope = "type", Target = "~T:System.Windows.Automation.SupportedTextSelection")] +// Reviewed and these are spelled correctly +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Automation.AutomationElement.IsOffscreenProperty")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~P:System.Windows.Automation.AutomationElement.AutomationElementInformation.IsOffscreen")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Automation.TextPattern.OverlineStyleAttribute")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Automation.TextPattern.OverlineColorAttribute")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~M:System.Windows.Automation.Provider.AutomationInteropProvider.ReturnRawElementProvider(System.IntPtr,System.IntPtr,System.IntPtr,System.Windows.Automation.Provider.IRawElementProviderSimple)~System.IntPtr")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~P:System.Windows.Automation.Provider.IWindowProvider.Maximizable")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~P:System.Windows.Automation.Provider.IWindowProvider.Minimizable")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~M:System.Windows.Rect.Offset(System.Windows.Rect,System.Double,System.Double)~System.Windows.Rect")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~M:System.Windows.Rect.Offset(System.Double,System.Double)")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~M:System.Windows.Point.Offset(System.Double,System.Double)")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Automation.Text.CapStyle.Unicase")] + +// Reviewed and these are correctly cased +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "ExceptionStringTable.resources", MessageId = "classname")] +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "ExceptionStringTable.resources", MessageId = "imagename")] +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "ExceptionStringTable.resources", MessageId = "nonenabled")] +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "ExceptionStringTable.resources", MessageId = "clientside")] +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "StringTable.resources", MessageId = "dataitem")] +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "StringTable.resources", MessageId = "datagrid")] + +// Reviewed and these are correctly suffixed +[module: SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Scope = "type", Target = "~T:System.Windows.Automation.AutomationTextAttribute")] +[module: SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Scope = "type", Target = "~T:System.Windows.Automation.PropertyConditionFlags")] +// These could just be moved outside of the using class but having the class nested helps code readability +[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "~T:System.Windows.Automation.MultipleViewPattern.MultipleViewPatternInformation")] +[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "~T:System.Windows.Automation.GridPattern.GridPatternInformation")] +[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "~T:System.Windows.Automation.TogglePattern.TogglePatternInformation")] +[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "~T:System.Windows.Automation.SelectionPattern.SelectionPatternInformation")] +[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "~T:System.Windows.Automation.RangeValuePattern.RangeValuePatternInformation")] +[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "~T:System.Windows.Automation.TablePattern.TablePatternInformation")] +[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "~T:System.Windows.Automation.ValuePattern.ValuePatternInformation")] +[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "~T:System.Windows.Automation.SelectionItemPattern.SelectionItemPatternInformation")] +[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "~T:System.Windows.Automation.AutomationElement.AutomationElementInformation")] +[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "~T:System.Windows.Automation.GridItemPattern.GridItemPatternInformation")] +[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "~T:System.Windows.Automation.ExpandCollapsePattern.ExpandCollapsePatternInformation")] +[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "~T:System.Windows.Automation.WindowPattern.WindowPatternInformation")] +[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "~T:System.Windows.Automation.DockPattern.DockPatternInformation")] +[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "~T:System.Windows.Automation.TableItemPattern.TableItemPatternInformation")] +[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "~T:System.Windows.Automation.ScrollPattern.ScrollPatternInformation")] +[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "~T:System.Windows.Automation.TransformPattern.TransformPatternInformation")] +// These classes don't typically get compared +[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "~T:System.Windows.Automation.MultipleViewPattern.MultipleViewPatternInformation")] +[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "~T:System.Windows.Automation.GridPattern.GridPatternInformation")] +[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "~T:System.Windows.Automation.TogglePattern.TogglePatternInformation")] +[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "~T:System.Windows.Automation.SelectionPattern.SelectionPatternInformation")] +[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "~T:System.Windows.Automation.RangeValuePattern.RangeValuePatternInformation")] +[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "~T:System.Windows.Automation.TablePattern.TablePatternInformation")] +[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "~T:System.Windows.Automation.ValuePattern.ValuePatternInformation")] +[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "~T:System.Windows.Automation.SelectionItemPattern.SelectionItemPatternInformation")] +[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "~T:System.Windows.Automation.AutomationElement.AutomationElementInformation")] +[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "~T:System.Windows.Automation.GridItemPattern.GridItemPatternInformation")] +[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "~T:System.Windows.Automation.ExpandCollapsePattern.ExpandCollapsePatternInformation")] +[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "~T:System.Windows.Automation.WindowPattern.WindowPatternInformation")] +[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "~T:System.Windows.Automation.DockPattern.DockPatternInformation")] +[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "~T:System.Windows.Automation.TableItemPattern.TableItemPatternInformation")] +[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "~T:System.Windows.Automation.ScrollPattern.ScrollPatternInformation")] +[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "~T:System.Windows.Automation.TransformPattern.TransformPatternInformation")] +[module: SuppressMessage("Microsoft.Design", "CA1036:OverrideMethodsOnComparableTypes", Scope = "type", Target = "~T:System.Windows.Automation.AutomationIdentifier")] +// Not exposed for V1; Consider this rule for V2 +[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "~T:System.Windows.Automation.ClientSideProviderDescription")] +// Not required for non-public code +[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "~N:System.Windows.Automation")] +[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "~N:System.Windows.Automation.Provider")] +[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "~N:System.Windows.Input")] +[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "~N:System.Windows.Automation.Text")] +[module: SuppressMessage("Microsoft.Naming", "CA1724:TypeNamesShouldNotMatchNamespaces", Scope = "type", Target = "~T:System.Windows.Automation.Automation")] +// Not appropriate; these are lower level events +[module: SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate", Scope = "member", Target = "~M:System.Windows.Automation.Provider.AutomationInteropProvider.RaiseAutomationPropertyChangedEvent(System.Windows.Automation.Provider.IRawElementProviderSimple,System.Windows.Automation.AutomationPropertyChangedEventArgs)")] +[module: SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate", Scope = "member", Target = "~M:System.Windows.Automation.Provider.AutomationInteropProvider.RaiseAutomationEvent(System.Windows.Automation.AutomationEvent,System.Windows.Automation.Provider.IRawElementProviderSimple,System.Windows.Automation.AutomationEventArgs)")] +[module: SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate", Scope = "member", Target = "~M:System.Windows.Automation.Provider.AutomationInteropProvider.RaiseStructureChangedEvent(System.Windows.Automation.Provider.IRawElementProviderSimple,System.Windows.Automation.StructureChangedEventArgs)")] +// SafeHandle isn't appropriate here; these are wrapped in classes that release resources though +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.Automation.UiaCoreApi.UiaAndOrCondition._conditions")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.Automation.UiaCoreApi.UiaCacheRequest._pPatterns")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.Automation.UiaCoreApi.UiaCacheRequest._pProperties")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.Automation.UiaCoreApi.UiaFindParams.pFindCondition")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.Automation.UiaCoreApi.UiaMiniCacheRequest._pCondition")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.Automation.UiaCoreApi.UiaMiniCacheRequest._pPatterns")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.Automation.UiaCoreApi.UiaMiniCacheRequest._pProperties")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.Automation.UiaCoreApi.UiaNotCondition._condition")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.Automation.UiaCoreApi.UiaStructureChangedEventArgs._pRuntimeId")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.Automation.UiaCoreApi.UiaWindowClosedEventArgs._pRuntimeId")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.Automation.FocusTracker._hwndLastBeforeMenu")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.Automation.BoundingRectTracker._lastHwnd")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.Automation.WinEventWrap.WinEvent._hwnd")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.Automation.WindowInteractionStateTracker._lastHwnd")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.Automation.Accessible._hwnd")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.UnsafeNativeMethods.HTCLIENT")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.UnsafeNativeMethods.HTTRANSPARENT")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.UnsafeNativeMethods.INVALID_HANDLE_VALUE")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.UnsafeNativeMethods.MENUBARINFO.hMenu")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.UnsafeNativeMethods.MSG.lParam")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.UnsafeNativeMethods.MSG.wParam")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.HWND.h")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.UnsafeNativeMethods.KEYBDINPUT.dwExtraInfo")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.UnsafeNativeMethods.MOUSEINPUT.dwExtraInfo")] + +// The method uses a large switch as a covertion table. Safe to exclude. +[module: SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Scope = "member", Target = "~M:System.Windows.Input.KeyInterop.KeyFromVirtualKey(System.Int32)~System.Windows.Input.Key")] +[module: SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Scope = "member", Target = "~M:System.Windows.Input.KeyInterop.VirtualKeyFromKey(System.Windows.Input.Key)~System.Int32")] + +// SafeHandle is not marshalled when in Structs. See comments in code. +[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "~M:MS.Internal.Automation.UiaCoreApi.UiaNodeFromFocus(MS.Internal.Automation.UiaCoreApi.UiaCacheRequest)~MS.Internal.Automation.UiaCoreApi.UiaCacheResponse", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] +[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "~M:MS.Internal.Automation.UiaCoreApi.UiaNodeFromPoint(System.Double,System.Double,MS.Internal.Automation.UiaCoreApi.UiaCacheRequest)~MS.Internal.Automation.UiaCoreApi.UiaCacheResponse", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] +[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "~M:MS.Internal.Automation.UiaCoreApi.UiaNavigate(MS.Internal.Automation.SafeNodeHandle,System.Windows.Automation.Provider.NavigateDirection,System.Windows.Automation.Condition,MS.Internal.Automation.UiaCoreApi.UiaCacheRequest)~MS.Internal.Automation.UiaCoreApi.UiaCacheResponse", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] +[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "~M:MS.Internal.Automation.UiaCoreApi.UiaAddEvent(MS.Internal.Automation.SafeNodeHandle,System.Int32,MS.Internal.Automation.UiaCoreApi.UiaEventCallback,System.Windows.Automation.TreeScope,System.Int32[],MS.Internal.Automation.UiaCoreApi.UiaCacheRequest)~MS.Internal.Automation.SafeEventHandle", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] +[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "~M:MS.Internal.Automation.UiaCoreApi.UiaGetUpdatedCache(MS.Internal.Automation.SafeNodeHandle,MS.Internal.Automation.UiaCoreApi.UiaCacheRequest,MS.Internal.Automation.UiaCoreApi.NormalizeState,System.Windows.Automation.Condition)~MS.Internal.Automation.UiaCoreApi.UiaCacheResponse", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] +[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "~M:System.Windows.Automation.NotCondition.#ctor(System.Windows.Automation.Condition)", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] +[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "~M:System.Windows.Automation.AndCondition.#ctor(System.Windows.Automation.Condition[])", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] +[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "~M:System.Windows.Automation.OrCondition.#ctor(System.Windows.Automation.Condition[])", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] +[module: SuppressMessage("Microsoft.Reliability", "CA2004:RemoveCallsToGCKeepAlive", Scope = "member", Target = "~M:MS.Internal.Automation.UiaCoreApi.UiaNodeFromFocus(MS.Internal.Automation.UiaCoreApi.UiaCacheRequest)~MS.Internal.Automation.UiaCoreApi.UiaCacheResponse")] +[module: SuppressMessage("Microsoft.Reliability", "CA2004:RemoveCallsToGCKeepAlive", Scope = "member", Target = "~M:MS.Internal.Automation.UiaCoreApi.UiaNodeFromPoint(System.Double,System.Double,MS.Internal.Automation.UiaCoreApi.UiaCacheRequest)~MS.Internal.Automation.UiaCoreApi.UiaCacheResponse")] +[module: SuppressMessage("Microsoft.Reliability", "CA2004:RemoveCallsToGCKeepAlive", Scope = "member", Target = "~M:MS.Internal.Automation.UiaCoreApi.UiaNavigate(MS.Internal.Automation.SafeNodeHandle,System.Windows.Automation.Provider.NavigateDirection,System.Windows.Automation.Condition,MS.Internal.Automation.UiaCoreApi.UiaCacheRequest)~MS.Internal.Automation.UiaCoreApi.UiaCacheResponse")] +[module: SuppressMessage("Microsoft.Reliability", "CA2004:RemoveCallsToGCKeepAlive", Scope = "member", Target = "~M:MS.Internal.Automation.UiaCoreApi.UiaAddEvent(MS.Internal.Automation.SafeNodeHandle,System.Int32,MS.Internal.Automation.UiaCoreApi.UiaEventCallback,System.Windows.Automation.TreeScope,System.Int32[],MS.Internal.Automation.UiaCoreApi.UiaCacheRequest)~MS.Internal.Automation.SafeEventHandle")] +[module: SuppressMessage("Microsoft.Reliability", "CA2004:RemoveCallsToGCKeepAlive", Scope = "member", Target = "~M:MS.Internal.Automation.UiaCoreApi.UiaGetUpdatedCache(MS.Internal.Automation.SafeNodeHandle,MS.Internal.Automation.UiaCoreApi.UiaCacheRequest,MS.Internal.Automation.UiaCoreApi.NormalizeState,System.Windows.Automation.Condition)~MS.Internal.Automation.UiaCoreApi.UiaCacheResponse")] diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/MS/Internal/Automation/CodeQuality_Approved.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/MS/Internal/Automation/CodeQuality_Approved.cs deleted file mode 100644 index 070d4e2cacc..00000000000 --- a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/MS/Internal/Automation/CodeQuality_Approved.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.CodeAnalysis; -// We don't own these names; the OS does -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.AbntC2")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.NumPad0")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.NumPad2")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.NumPad5")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.NumPad7")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.NumPad9")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.NumPad1")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.DbeSbcsChar")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.NumPad3")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.NumPad8")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.JunjaMode")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.OemEnlw")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.DbeDbcsChar")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.NumPad4")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.NumLock")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.NumPad6")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.EraseEof")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Input.Key.AbntC1")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Automation.TransformPattern.Move(System.Double,System.Double):System.Void", MessageId = "0#x")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Automation.TransformPattern.Move(System.Double,System.Double):System.Void", MessageId = "1#y")] -[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "MS.Internal.Automation.Misc.TryMsgWaitForMultipleObjects(Microsoft.Win32.SafeHandles.SafeWaitHandle,System.Boolean,System.Int32,System.Int32,System.Int32&):System.Int32", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] -// The type that is passed is correct -[module: SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Scope = "member", Target = "System.Windows.Automation.Provider.AutomationInteropProvider.RaiseAutomationEvent(System.Windows.Automation.AutomationEvent,System.Windows.Automation.Provider.IRawElementProviderSimple,System.Windows.Automation.AutomationEventArgs):System.Void")] -[module: SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Scope = "member", Target = "System.Windows.Automation.Automation.PropertyName(System.Windows.Automation.AutomationProperty):System.String")] -[module: SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Scope = "member", Target = "System.Windows.Automation.Automation.PatternName(System.Windows.Automation.AutomationPattern):System.String")] -[module: SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Scope="type", Target="System.Windows.Automation.AutomationFocusChangedEventArgs")] -// The rule doesn't apply to non-public namespaces -[module: SuppressMessage("Microsoft.MSInternal", "CA904:DeclareTypesInMicrosoftOrSystemNamespace", Scope = "namespace", Target = "MS.Internal")] -[module: SuppressMessage("Microsoft.MSInternal", "CA904:DeclareTypesInMicrosoftOrSystemNamespace", Scope = "namespace", Target = "MS.Win32")] -// Reviewed by WinFX team and this case is OK -[module: SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Scope = "type", Target = "System.Windows.Automation.Text.FlowDirections")] -// Reviewed by atgarch and these enums are OK -[module: SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames", Scope = "type", Target = "System.Windows.Automation.TreeScope")] -[module: SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames", Scope = "type", Target = "System.Windows.Automation.ClientSideProviderMatchIndicator")] -[module: SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames", Scope = "type", Target = "System.Windows.Automation.SupportedTextSelection")] -// Reviewed and these are spelled correctly -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Automation.AutomationElement.IsOffscreenProperty")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Automation.AutomationElement+AutomationElementInformation.IsOffscreen")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Automation.TextPattern.OverlineStyleAttribute")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Automation.TextPattern.OverlineColorAttribute")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Automation.Provider.AutomationInteropProvider.ReturnRawElementProvider(System.IntPtr,System.IntPtr,System.IntPtr,System.Windows.Automation.Provider.IRawElementProviderSimple):System.IntPtr")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Automation.Provider.IWindowProvider.Maximizable")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Automation.Provider.IWindowProvider.Minimizable")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Rect.Offset(System.Windows.Rect,System.Double,System.Double):System.Windows.Rect")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Rect.Offset(System.Double,System.Double):System.Void")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Point.Offset(System.Double,System.Double):System.Void")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Automation.Text.CapStyle.Unicase")] - -// Reviewed and these are correctly cased -[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "ExceptionStringTable.resources", MessageId = "classname")] -[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "ExceptionStringTable.resources", MessageId = "imagename")] -[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "ExceptionStringTable.resources", MessageId = "nonenabled")] -[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "ExceptionStringTable.resources", MessageId = "clientside")] -[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "StringTable.resources", MessageId = "dataitem")] -[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "StringTable.resources", MessageId = "datagrid")] - -// Reviewed and these are correctly suffixed -[module: SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Scope = "type", Target = "System.Windows.Automation.AutomationTextAttribute")] -[module: SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Scope = "type", Target = "System.Windows.Automation.PropertyConditionFlags")] -// These could just be moved outside of the using class but having the class nested helps code readability -[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "System.Windows.Automation.MultipleViewPattern+MultipleViewPatternInformation")] -[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "System.Windows.Automation.GridPattern+GridPatternInformation")] -[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "System.Windows.Automation.TogglePattern+TogglePatternInformation")] -[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "System.Windows.Automation.SelectionPattern+SelectionPatternInformation")] -[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "System.Windows.Automation.RangeValuePattern+RangeValuePatternInformation")] -[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "System.Windows.Automation.TablePattern+TablePatternInformation")] -[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "System.Windows.Automation.ValuePattern+ValuePatternInformation")] -[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "System.Windows.Automation.SelectionItemPattern+SelectionItemPatternInformation")] -[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "System.Windows.Automation.AutomationElement+AutomationElementInformation")] -[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "System.Windows.Automation.GridItemPattern+GridItemPatternInformation")] -[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "System.Windows.Automation.ExpandCollapsePattern+ExpandCollapsePatternInformation")] -[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "System.Windows.Automation.WindowPattern+WindowPatternInformation")] -[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "System.Windows.Automation.DockPattern+DockPatternInformation")] -[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "System.Windows.Automation.TableItemPattern+TableItemPatternInformation")] -[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "System.Windows.Automation.ScrollPattern+ScrollPatternInformation")] -[module: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope = "type", Target = "System.Windows.Automation.TransformPattern+TransformPatternInformation")] -// These classes don't typically get compared -[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "System.Windows.Automation.MultipleViewPattern+MultipleViewPatternInformation")] -[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "System.Windows.Automation.GridPattern+GridPatternInformation")] -[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "System.Windows.Automation.TogglePattern+TogglePatternInformation")] -[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "System.Windows.Automation.SelectionPattern+SelectionPatternInformation")] -[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "System.Windows.Automation.RangeValuePattern+RangeValuePatternInformation")] -[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "System.Windows.Automation.TablePattern+TablePatternInformation")] -[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "System.Windows.Automation.ValuePattern+ValuePatternInformation")] -[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "System.Windows.Automation.SelectionItemPattern+SelectionItemPatternInformation")] -[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "System.Windows.Automation.AutomationElement+AutomationElementInformation")] -[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "System.Windows.Automation.GridItemPattern+GridItemPatternInformation")] -[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "System.Windows.Automation.ExpandCollapsePattern+ExpandCollapsePatternInformation")] -[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "System.Windows.Automation.WindowPattern+WindowPatternInformation")] -[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "System.Windows.Automation.DockPattern+DockPatternInformation")] -[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "System.Windows.Automation.TableItemPattern+TableItemPatternInformation")] -[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "System.Windows.Automation.ScrollPattern+ScrollPatternInformation")] -[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "System.Windows.Automation.TransformPattern+TransformPatternInformation")] -[module: SuppressMessage("Microsoft.Design", "CA1036:OverrideMethodsOnComparableTypes", Scope = "type", Target = "System.Windows.Automation.AutomationIdentifier")] -// Not exposed for V1; Consider this rule for V2 -[module: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope = "type", Target = "System.Windows.Automation.ClientSideProviderDescription")] -// Not required for non-public code -[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "System.Windows.Automation")] -[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "System.Windows.Automation.Provider")] -[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "System.Windows.Input")] -[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "System.Windows.Automation.Text")] -[module: SuppressMessage("Microsoft.Naming", "CA1724:TypeNamesShouldNotMatchNamespaces", Scope = "type", Target = "System.Windows.Automation.Automation")] -// Not appropriate; these are lower level events -[module: SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate", Scope = "member", Target = "System.Windows.Automation.Provider.AutomationInteropProvider.RaiseAutomationPropertyChangedEvent(System.Windows.Automation.Provider.IRawElementProviderSimple,System.Windows.Automation.AutomationPropertyChangedEventArgs):System.Void")] -[module: SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate", Scope = "member", Target = "System.Windows.Automation.Provider.AutomationInteropProvider.RaiseAutomationEvent(System.Windows.Automation.AutomationEvent,System.Windows.Automation.Provider.IRawElementProviderSimple,System.Windows.Automation.AutomationEventArgs):System.Void")] -[module: SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate", Scope = "member", Target = "System.Windows.Automation.Provider.AutomationInteropProvider.RaiseStructureChangedEvent(System.Windows.Automation.Provider.IRawElementProviderSimple,System.Windows.Automation.StructureChangedEventArgs):System.Void")] -// SafeHandle isn't appropriate here; these are wrapped in classes that release resources though -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi+UiaAndOrCondition._conditions")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi+UiaCacheRequest._pPatterns")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi+UiaCacheRequest._pProperties")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi+UiaFindParams.pFindCondition")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi+UiaMiniCacheRequest._pCondition")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi+UiaMiniCacheRequest._pPatterns")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi+UiaMiniCacheRequest._pProperties")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi+UiaNotCondition._condition")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi+UiaStructureChangedEventArgs._pRuntimeId")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi+UiaWindowClosedEventArgs._pRuntimeId")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Internal.Automation.FocusTracker._hwndLastBeforeMenu")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Internal.Automation.BoundingRectTracker._lastHwnd")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Internal.Automation.WinEventWrap+WinEvent._hwnd")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Internal.Automation.WindowInteractionStateTracker._lastHwnd")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Internal.Automation.Accessible._hwnd")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Win32.UnsafeNativeMethods.HTCLIENT")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Win32.UnsafeNativeMethods.HTTRANSPARENT")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Win32.UnsafeNativeMethods.INVALID_HANDLE_VALUE")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Win32.UnsafeNativeMethods+MENUBARINFO.hMenu")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Win32.UnsafeNativeMethods+MSG.lParam")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Win32.UnsafeNativeMethods+MSG.wParam")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Win32.NativeMethods+HWND.h")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Win32.UnsafeNativeMethods+KEYBDINPUT.dwExtraInfo")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Win32.UnsafeNativeMethods+MOUSEINPUT.dwExtraInfo")] - -// The method uses a large switch as a covertion table. Safe to exclude. -[module: SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Scope="member", Target="System.Windows.Input.KeyInterop.KeyFromVirtualKey(System.Int32):System.Windows.Input.Key")] -[module: SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Scope="member", Target="System.Windows.Input.KeyInterop.VirtualKeyFromKey(System.Windows.Input.Key):System.Int32")] - -// SafeHandle is not marshalled when in Structs. See comments in code. -[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi.UiaNodeFromFocus(MS.Internal.Automation.UiaCoreApi+UiaCacheRequest):MS.Internal.Automation.UiaCoreApi+UiaCacheResponse", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] -[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi.UiaNodeFromPoint(System.Double,System.Double,MS.Internal.Automation.UiaCoreApi+UiaCacheRequest):MS.Internal.Automation.UiaCoreApi+UiaCacheResponse", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] -[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi.UiaNavigate(MS.Internal.Automation.SafeNodeHandle,System.Windows.Automation.Provider.NavigateDirection,System.Windows.Automation.Condition,MS.Internal.Automation.UiaCoreApi+UiaCacheRequest):MS.Internal.Automation.UiaCoreApi+UiaCacheResponse", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] -[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi.UiaAddEvent(MS.Internal.Automation.SafeNodeHandle,System.Int32,MS.Internal.Automation.UiaCoreApi+UiaEventCallback,System.Windows.Automation.TreeScope,System.Int32[],MS.Internal.Automation.UiaCoreApi+UiaCacheRequest):MS.Internal.Automation.SafeEventHandle", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] -[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi.UiaGetUpdatedCache(MS.Internal.Automation.SafeNodeHandle,MS.Internal.Automation.UiaCoreApi+UiaCacheRequest,MS.Internal.Automation.UiaCoreApi+NormalizeState,System.Windows.Automation.Condition):MS.Internal.Automation.UiaCoreApi+UiaCacheResponse", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] -[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "System.Windows.Automation.NotCondition..ctor(System.Windows.Automation.Condition)", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] -[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "System.Windows.Automation.AndCondition..ctor(System.Windows.Automation.Condition[])", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] -[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "System.Windows.Automation.OrCondition..ctor(System.Windows.Automation.Condition[])", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] -[module: SuppressMessage("Microsoft.Reliability", "CA2004:RemoveCallsToGCKeepAlive", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi.UiaNodeFromFocus(MS.Internal.Automation.UiaCoreApi+UiaCacheRequest):MS.Internal.Automation.UiaCoreApi+UiaCacheResponse")] -[module: SuppressMessage("Microsoft.Reliability", "CA2004:RemoveCallsToGCKeepAlive", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi.UiaNodeFromPoint(System.Double,System.Double,MS.Internal.Automation.UiaCoreApi+UiaCacheRequest):MS.Internal.Automation.UiaCoreApi+UiaCacheResponse")] -[module: SuppressMessage("Microsoft.Reliability", "CA2004:RemoveCallsToGCKeepAlive", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi.UiaNavigate(MS.Internal.Automation.SafeNodeHandle,System.Windows.Automation.Provider.NavigateDirection,System.Windows.Automation.Condition,MS.Internal.Automation.UiaCoreApi+UiaCacheRequest):MS.Internal.Automation.UiaCoreApi+UiaCacheResponse")] -[module: SuppressMessage("Microsoft.Reliability", "CA2004:RemoveCallsToGCKeepAlive", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi.UiaAddEvent(MS.Internal.Automation.SafeNodeHandle,System.Int32,MS.Internal.Automation.UiaCoreApi+UiaEventCallback,System.Windows.Automation.TreeScope,System.Int32[],MS.Internal.Automation.UiaCoreApi+UiaCacheRequest):MS.Internal.Automation.SafeEventHandle")] -[module: SuppressMessage("Microsoft.Reliability", "CA2004:RemoveCallsToGCKeepAlive", Scope = "member", Target = "MS.Internal.Automation.UiaCoreApi.UiaGetUpdatedCache(MS.Internal.Automation.SafeNodeHandle,MS.Internal.Automation.UiaCoreApi+UiaCacheRequest,MS.Internal.Automation.UiaCoreApi+NormalizeState,System.Windows.Automation.Condition):MS.Internal.Automation.UiaCoreApi+UiaCacheResponse")] diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/UIAutomationClient.csproj b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/UIAutomationClient.csproj index 870f1c0b206..30097cffdb4 100644 --- a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/UIAutomationClient.csproj +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/UIAutomationClient.csproj @@ -29,7 +29,7 @@ - + diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClientSideProviders/GlobalSuppressions.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClientSideProviders/GlobalSuppressions.cs new file mode 100644 index 00000000000..9460ec00507 --- /dev/null +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClientSideProviders/GlobalSuppressions.cs @@ -0,0 +1,135 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Diagnostics.CodeAnalysis; + +// No way to Marshal an array of SafeHandles to an array of IntPtrs for MsgWaitForMultipleObjects +[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "~M:MS.Internal.AutomationProxies.Misc.MsgWaitForMultipleObjects(Microsoft.Win32.SafeHandles.SafeWaitHandle,System.Boolean,System.Int32,System.Int32)~System.Int32", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] +// The rule doesn't apply to non-public namespaces +[module: SuppressMessage("Microsoft.MSInternal", "CA904:DeclareTypesInMicrosoftOrSystemNamespace", Scope = "namespace", Target = "~N:MS.Win32")] +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "StringTable.resources", MessageId = "Prt")] +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "StringTable.resources", MessageId = "Scn")] +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "StringTable.resources", MessageId = "Rq")] +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "StringTable.resources", MessageId = "Lk")] +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "StringTable.resources", MessageId = "Scr")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.EventManager._hwndLast")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.ProxyHwnd._controlLabel")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.MSAAWinEventWrap.WinEvent._hwnd")] +// The rule doesn't apply if the resource isn't owned by this code (these are mainly hwnds) +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.Accessible._hwnd")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.WindowsTreeView.TreeViewItem._hItem")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.GroupManager._hwnd")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.WindowsRebar.RebarBandItem._hwndBand")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.WinEventTracker.EventCreateParams._hwnd")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.WindowsMenu.MenuItem._hmenu")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.WindowsMenu.MenuItem.MSAAMENUINFO.pszWText")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.GroupManager.Group._hwnd")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.WindowsComboBox._hwndEx")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.ClickablePoint._hwndDesktop")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.ClickablePoint._hwndProgman")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.ProxySimple._hwndDesktop")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.ProxySimple._hwnd")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.GroupManager.SortGroups._hwnd")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.GroupManager.SortGroupItems._hwnd")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.WindowsMenu._hmenu")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.WinEventTracker.EventHookParams._winEventHook")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.WindowsMenu.MenuParentInfo._hwndParent")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Internal.AutomationProxies.MsaaNativeProvider._hwnd")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.MENUITEMINFO.hbmpChecked")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.MENUITEMINFO.hbmpItem")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.MENUITEMINFO.dwItemData")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.MENUITEMINFO.dwTypeData")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.MENUITEMINFO.hSubMenu")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.MENUITEMINFO.hbmpUnchecked")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.TCITEM.pszText")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.TCITEM.lParam")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.TOOLINFO.pszText")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.TOOLINFO.hinst")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.TOOLINFO.hwnd")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.TOOLINFO.lParam")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.TVHITTESTINFO.hItem")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.TVITEM.pszText")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.TVITEM.hItem")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.TVITEM.lParam")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.UnsafeNativeMethods.LITEM.szURL")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.UnsafeNativeMethods.LITEM.szID")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.LVGROUP.pszHeader")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.LVGROUP.pszFooter")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.SYSTEM_INFO.dwActiveProcessorMask")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.SYSTEM_INFO.lpMinimumApplicationAddress")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.SYSTEM_INFO.lpMaximumApplicationAddress")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.REBARBANDINFO.hbmBack")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.REBARBANDINFO.hwndChild")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.REBARBANDINFO.lParam")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.REBARBANDINFO.lpText")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.COMBOBOXINFO.hwndCombo")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.COMBOBOXINFO.hwndList")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.COMBOBOXINFO.hwndItem")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.KEYBDINPUT.dwExtraInfo")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.HDITEM.pszText")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.HDITEM.hbm")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.HDITEM.pvFilter")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.HDITEM.lParam")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.GUITHREADINFO.hwndActive")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.GUITHREADINFO.hwndCapture")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.GUITHREADINFO.hwndFocus")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.GUITHREADINFO.hwndCaret")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.GUITHREADINFO.hwndMenuOwner")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.GUITHREADINFO.hwndMoveSize")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.MENUBARINFO.hwndMenu")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.MENUBARINFO.hMenu")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.MSG.lParam")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.MSG.wParam")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.MSG.hwnd")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.NMHDR.hwndFrom")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.UnsafeNativeMethods.FORMATETC.ptd")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.UnsafeNativeMethods.STGMEDIUM.pUnkForRelease")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.UnsafeNativeMethods.STGMEDIUM.hGlobal")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.LVITEM_V6.pszText")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.LVITEM_V6.lParam")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.LVITEM_V6.puColumns")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.UnsafeNativeMethods.ENUMTOOLTIPWINDOWINFO.hwnd")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.LVITEM.pszText")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.LVITEM.lParam")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.MOUSEINPUT.dwExtraInfo")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.NativeMethods.TBBUTTON.iString")] +[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "~F:MS.Win32.UnsafeNativeMethods.ENUMCHILDWINDOWFROMRECT.hwnd")] +// The rule doesn't apply if the resource isn't owned by this code (these are mainly hwnds) +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Internal.AutomationProxies.Accessible")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Internal.AutomationProxies.GroupManager")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Internal.AutomationProxies.ProxyHwnd")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Internal.AutomationProxies.WindowsComboBox")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Internal.AutomationProxies.WindowsMenu.MenuItem.MSAAMENUINFO")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Internal.AutomationProxies.WindowsRebar.RebarBandItem")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Internal.AutomationProxies.WinEventTracker.EventHookParams")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.MENUITEMINFO")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.TCITEM")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.TOOLINFO")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.TVHITTESTINFO")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.TVITEM")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.UnsafeNativeMethods.LITEM")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.LVGROUP")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.SYSTEM_INFO")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.REBARBANDINFO")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.COMBOBOXINFO")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.KEYBDINPUT")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.HDITEM")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.GUITHREADINFO")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.MENUBARINFO")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.MSG")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.NMHDR")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.UnsafeNativeMethods.FORMATETC")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.UnsafeNativeMethods.STGMEDIUM")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.LVITEM_V6")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.UnsafeNativeMethods.ENUMTOOLTIPWINDOWINFO")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.LVITEM")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.UnsafeNativeMethods.ENUMCHILDWINDOWFROMRECT")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.MOUSEINPUT")] +[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope = "type", Target = "~T:MS.Win32.NativeMethods.TBBUTTON")] +// No threading issue here +[module: SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "~F:UIAutomationClientsideProviders.UIAutomationClientSideProviders.ClientSideProviderDescriptionTable")] +// Spelling is correct for this usage +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "namespace", Target = "~N:UIAutomationClientsideProviders")] +// This is non-public code +[module: SuppressMessage("Microsoft.MSInternal", "CA904:DeclareTypesInMicrosoftOrSystemNamespace", Scope = "namespace", Target = "~N:UIAutomationClientsideProviders")] +[module: SuppressMessage("Microsoft.Naming", "CA1724:TypeNamesShouldNotMatchNamespaces", Scope = "type", Target = "~T:UIAutomationClientsideProviders.UIAutomationClientSideProviders")] diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClientSideProviders/MS/Internal/AutomationProxies/CodeQuality_Approved.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClientSideProviders/MS/Internal/AutomationProxies/CodeQuality_Approved.cs deleted file mode 100644 index 99981e174e0..00000000000 --- a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClientSideProviders/MS/Internal/AutomationProxies/CodeQuality_Approved.cs +++ /dev/null @@ -1,135 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.CodeAnalysis; -// No way to Marshal an array of SafeHandles to an array of IntPtrs for MsgWaitForMultipleObjects -[module: SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", Scope = "member", Target = "MS.Internal.AutomationProxies.Misc.MsgWaitForMultipleObjects(Microsoft.Win32.SafeHandles.SafeWaitHandle,System.Boolean,System.Int32,System.Int32):System.Int32", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle")] -// The rule doesn't apply to non-public namespaces -[module: SuppressMessage("Microsoft.MSInternal", "CA904:DeclareTypesInMicrosoftOrSystemNamespace", Scope="namespace", Target="MS.Win32")] -[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope="resource", Target="StringTable.resources", MessageId="Prt")] -[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope="resource", Target="StringTable.resources", MessageId="Scn")] -[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope="resource", Target="StringTable.resources", MessageId="Rq")] -[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope="resource", Target="StringTable.resources", MessageId="Lk")] -[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope="resource", Target="StringTable.resources", MessageId="Scr")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope = "member", Target = "MS.Internal.AutomationProxies.EventManager._hwndLast")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.ProxyHwnd._controlLabel")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.MSAAWinEventWrap+WinEvent._hwnd")] -// The rule doesn't apply if the resource isn't owned by this code (these are mainly hwnds) -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.Accessible._hwnd")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.WindowsTreeView+TreeViewItem._hItem")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.GroupManager._hwnd")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.WindowsRebar+RebarBandItem._hwndBand")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.WinEventTracker+EventCreateParams._hwnd")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.WindowsMenu+MenuItem._hmenu")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.WindowsMenu+MenuItem+MSAAMENUINFO.pszWText")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.GroupManager+Group._hwnd")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.WindowsComboBox._hwndEx")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.ClickablePoint._hwndDesktop")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.ClickablePoint._hwndProgman")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.ProxySimple._hwndDesktop")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.ProxySimple._hwnd")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.GroupManager+SortGroups._hwnd")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.GroupManager+SortGroupItems._hwnd")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.WindowsMenu._hmenu")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.WinEventTracker+EventHookParams._winEventHook")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.WindowsMenu+MenuParentInfo._hwndParent")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Internal.AutomationProxies.MsaaNativeProvider._hwnd")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+MENUITEMINFO.hbmpChecked")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+MENUITEMINFO.hbmpItem")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+MENUITEMINFO.dwItemData")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+MENUITEMINFO.dwTypeData")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+MENUITEMINFO.hSubMenu")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+MENUITEMINFO.hbmpUnchecked")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+TCITEM.pszText")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+TCITEM.lParam")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+TOOLINFO.pszText")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+TOOLINFO.hinst")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+TOOLINFO.hwnd")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+TOOLINFO.lParam")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+TVHITTESTINFO.hItem")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+TVITEM.pszText")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+TVITEM.hItem")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+TVITEM.lParam")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.UnsafeNativeMethods+LITEM.szURL")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.UnsafeNativeMethods+LITEM.szID")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+LVGROUP.pszHeader")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+LVGROUP.pszFooter")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+SYSTEM_INFO.dwActiveProcessorMask")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+SYSTEM_INFO.lpMinimumApplicationAddress")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+SYSTEM_INFO.lpMaximumApplicationAddress")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+REBARBANDINFO.hbmBack")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+REBARBANDINFO.hwndChild")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+REBARBANDINFO.lParam")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+REBARBANDINFO.lpText")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+COMBOBOXINFO.hwndCombo")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+COMBOBOXINFO.hwndList")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+COMBOBOXINFO.hwndItem")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+KEYBDINPUT.dwExtraInfo")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+HDITEM.pszText")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+HDITEM.hbm")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+HDITEM.pvFilter")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+HDITEM.lParam")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+GUITHREADINFO.hwndActive")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+GUITHREADINFO.hwndCapture")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+GUITHREADINFO.hwndFocus")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+GUITHREADINFO.hwndCaret")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+GUITHREADINFO.hwndMenuOwner")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+GUITHREADINFO.hwndMoveSize")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+MENUBARINFO.hwndMenu")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+MENUBARINFO.hMenu")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+MSG.lParam")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+MSG.wParam")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+MSG.hwnd")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+NMHDR.hwndFrom")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.UnsafeNativeMethods+FORMATETC.ptd")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.UnsafeNativeMethods+STGMEDIUM.pUnkForRelease")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.UnsafeNativeMethods+STGMEDIUM.hGlobal")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+LVITEM_V6.pszText")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+LVITEM_V6.lParam")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+LVITEM_V6.puColumns")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.UnsafeNativeMethods+ENUMTOOLTIPWINDOWINFO.hwnd")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+LVITEM.pszText")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+LVITEM.lParam")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+MOUSEINPUT.dwExtraInfo")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.NativeMethods+TBBUTTON.iString")] -[module: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="MS.Win32.UnsafeNativeMethods+ENUMCHILDWINDOWFROMRECT.hwnd")] -// The rule doesn't apply if the resource isn't owned by this code (these are mainly hwnds) -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Internal.AutomationProxies.Accessible")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Internal.AutomationProxies.GroupManager")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Internal.AutomationProxies.ProxyHwnd")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Internal.AutomationProxies.WindowsComboBox")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Internal.AutomationProxies.WindowsMenu+MenuItem+MSAAMENUINFO")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Internal.AutomationProxies.WindowsRebar+RebarBandItem")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Internal.AutomationProxies.WinEventTracker+EventHookParams")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+MENUITEMINFO")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+TCITEM")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+TOOLINFO")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+TVHITTESTINFO")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+TVITEM")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.UnsafeNativeMethods+LITEM")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+LVGROUP")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+SYSTEM_INFO")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+REBARBANDINFO")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+COMBOBOXINFO")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+KEYBDINPUT")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+HDITEM")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+GUITHREADINFO")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+MENUBARINFO")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+MSG")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+NMHDR")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.UnsafeNativeMethods+FORMATETC")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.UnsafeNativeMethods+STGMEDIUM")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+LVITEM_V6")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.UnsafeNativeMethods+ENUMTOOLTIPWINDOWINFO")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+LVITEM")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.UnsafeNativeMethods+ENUMCHILDWINDOWFROMRECT")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+MOUSEINPUT")] -[module: SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Scope="type", Target="MS.Win32.NativeMethods+TBBUTTON")] -// No threading issue here -[module: SuppressMessage( "Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "UIAutomationClientsideProviders.UIAutomationClientSideProviders.ClientSideProviderDescriptionTable" )] -// Spelling is correct for this usage -[module: SuppressMessage( "Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "namespace", Target = "UIAutomationClientsideProviders" )] -// This is non-public code -[module: SuppressMessage( "Microsoft.MSInternal", "CA904:DeclareTypesInMicrosoftOrSystemNamespace", Scope = "namespace", Target = "UIAutomationClientsideProviders" )] -[module: SuppressMessage( "Microsoft.Naming", "CA1724:TypeNamesShouldNotMatchNamespaces", Scope = "type", Target = "UIAutomationClientsideProviders.UIAutomationClientSideProviders" )] diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClientSideProviders/UIAutomationClientSideProviders.csproj b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClientSideProviders/UIAutomationClientSideProviders.csproj index 106e50cb575..3a02e2f0c81 100644 --- a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClientSideProviders/UIAutomationClientSideProviders.csproj +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClientSideProviders/UIAutomationClientSideProviders.csproj @@ -21,7 +21,7 @@ - + diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/MS/Internal/Automation/CodeQuality_Approved.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/GlobalSuppressions.cs similarity index 62% rename from src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/MS/Internal/Automation/CodeQuality_Approved.cs rename to src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/GlobalSuppressions.cs index 0c7ea81e19e..d920d164637 100644 --- a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/MS/Internal/Automation/CodeQuality_Approved.cs +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/GlobalSuppressions.cs @@ -1,46 +1,45 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. using System.Diagnostics.CodeAnalysis; -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Automation.TextPatternIdentifiers.OverlineStyleAttribute" )] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Automation.TextPatternIdentifiers.OverlineColorAttribute" )] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Automation.AutomationElementIdentifiers.IsOffscreenProperty" )] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Automation.TextPatternIdentifiers.OverlineStyleAttribute")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Automation.TextPatternIdentifiers.OverlineColorAttribute")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Automation.AutomationElementIdentifiers.IsOffscreenProperty")] // Approved by avsec. [module: SuppressMessage("Microsoft.MSInternal", "CA900:AptcaAssembliesShouldBeReviewed")] // The rule doesn't apply to non-public namespaces -[module: SuppressMessage("Microsoft.MSInternal", "CA904:DeclareTypesInMicrosoftOrSystemNamespace", Scope = "namespace", Target = "MS.Internal")] -[module: SuppressMessage("Microsoft.MSInternal", "CA904:DeclareTypesInMicrosoftOrSystemNamespace", Scope = "namespace", Target = "MS.Win32")] +[module: SuppressMessage("Microsoft.MSInternal", "CA904:DeclareTypesInMicrosoftOrSystemNamespace", Scope = "namespace", Target = "~N:MS.Internal")] +[module: SuppressMessage("Microsoft.MSInternal", "CA904:DeclareTypesInMicrosoftOrSystemNamespace", Scope = "namespace", Target = "~N:MS.Win32")] // Reviewed by WinFX team and this case is OK -[module: SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Scope = "type", Target = "System.Windows.Automation.Text.FlowDirections")] +[module: SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Scope = "type", Target = "~T:System.Windows.Automation.Text.FlowDirections")] // Reviewed by atgarch and these enums are OK -[module: SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames", Scope = "type", Target = "System.Windows.Automation.TreeScope")] -[module: SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames", Scope = "type", Target = "System.Windows.Automation.SupportedTextSelection")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Rect.Offset(System.Windows.Rect,System.Double,System.Double):System.Windows.Rect")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Rect.Offset(System.Double,System.Double):System.Void")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Point.Offset(System.Double,System.Double):System.Void")] -[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "System.Windows.Automation.Text.CapStyle.Unicase")] +[module: SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames", Scope = "type", Target = "~T:System.Windows.Automation.TreeScope")] +[module: SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames", Scope = "type", Target = "~T:System.Windows.Automation.SupportedTextSelection")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~M:System.Windows.Rect.Offset(System.Windows.Rect,System.Double,System.Double)~System.Windows.Rect")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~M:System.Windows.Rect.Offset(System.Double,System.Double)")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~M:System.Windows.Point.Offset(System.Double,System.Double)")] +[module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "member", Target = "~F:System.Windows.Automation.Text.CapStyle.Unicase")] [module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "ExceptionStringTable.resources", MessageId = "classname")] [module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "ExceptionStringTable.resources", MessageId = "imagename")] [module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "StringTable.resources", MessageId = "dataitem")] [module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "StringTable.resources", MessageId = "datagrid")] // Reviewed and these are correctly suffixed -[module: SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Scope = "type", Target = "System.Windows.Automation.AutomationTextAttribute")] -[module: SuppressMessage("Microsoft.Design", "CA1036:OverrideMethodsOnComparableTypes", Scope = "type", Target = "System.Windows.Automation.AutomationIdentifier")] +[module: SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Scope = "type", Target = "~T:System.Windows.Automation.AutomationTextAttribute")] +[module: SuppressMessage("Microsoft.Design", "CA1036:OverrideMethodsOnComparableTypes", Scope = "type", Target = "~T:System.Windows.Automation.AutomationIdentifier")] // Not required for non-public code -[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "System.Windows.Automation")] -[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "System.Windows.Automation.Provider")] -[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "System.Windows.Input")] -[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "System.Windows.Automation.Text")] -[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "System.Windows.Automation")] +[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "~N:System.Windows.Automation")] +[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "~N:System.Windows.Automation.Provider")] +[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "~N:System.Windows.Input")] +[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "~N:System.Windows.Automation.Text")] +[module: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope = "namespace", Target = "~N:System.Windows.Automation")] // The method uses a large switch as a covertion table. Safe to exclude. -[module: SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Scope="member", Target="System.Windows.Input.KeyInterop.KeyFromVirtualKey(System.Int32):System.Windows.Input.Key")] -[module: SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Scope="member", Target="System.Windows.Input.KeyInterop.VirtualKeyFromKey(System.Windows.Input.Key):System.Int32")] +[module: SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Scope = "member", Target = "~M:System.Windows.Input.KeyInterop.KeyFromVirtualKey(System.Int32)~System.Windows.Input.Key")] +[module: SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Scope = "member", Target = "~M:System.Windows.Input.KeyInterop.VirtualKeyFromKey(System.Windows.Input.Key)~System.Int32")] //************************************************************************************************************************** // Non hyphenated words are Microsoft style. //*************************************************************************************************************************** -[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope="resource", Target="ExceptionStringTable.resources", MessageId="nonenabled")] +[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "ExceptionStringTable.resources", MessageId = "nonenabled")] diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/UIAutomationTypes.csproj b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/UIAutomationTypes.csproj index 42827702f21..b0bfdb8ec9b 100644 --- a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/UIAutomationTypes.csproj +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/UIAutomationTypes.csproj @@ -28,7 +28,7 @@ - +