Skip to content

Commit 101bee4

Browse files
committed
fix warnings
1 parent 8410cc7 commit 101bee4

10 files changed

Lines changed: 47 additions & 47 deletions

src/tools/winui-analyzer/Microsoft.WindowsAppSDK.Analyzers.Tests/Rules/ApiMappingAnalyzerTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public sealed class ApiMappingAnalyzerTests
2323
</Package>";
2424

2525
[Fact]
26-
public async Task Wui1001_FlagsCompositionNamespaceUsing_InMigratingProject()
26+
public async Task Wui1001FlagsCompositionNamespaceUsingInMigratingProject()
2727
{
2828
// Windows.UI.Composition IS a mapping entry → WUI1001 fires; namespace prefix
2929
// also matches a feature mapping → WUI1010 fires alongside.
@@ -36,7 +36,7 @@ public async Task Wui1001_FlagsCompositionNamespaceUsing_InMigratingProject()
3636
}
3737

3838
[Fact]
39-
public async Task Wui1002_FlagsPrintManager_NoEquivalent()
39+
public async Task Wui1002FlagsPrintManagerNoEquivalent()
4040
{
4141
// PrintManager has no WinAppSDK equivalent — should produce WUI1002.
4242
// Trigger UWP-context detection via Package.appxmanifest.
@@ -50,7 +50,7 @@ namespace Sample { class C { void M() { var p = global::Windows.Graphics.Printin
5050
}
5151

5252
[Fact]
53-
public async Task Wui1xxx_DoesNotFireInGreenfieldProject()
53+
public async Task Wui1xxxDoesNotFireInGreenfieldProject()
5454
{
5555
// No Windows.UI.* using and no UWP manifest → context = greenfield → no diagnostics.
5656
await new AnalyzerTest<ApiMappingAnalyzer>()
@@ -63,7 +63,7 @@ namespace Sample { class C {} }")
6363
}
6464

6565
[Fact]
66-
public async Task Wui1010_FeatureHintFiresOnFeatureNamespace()
66+
public async Task Wui1010FeatureHintFiresOnFeatureNamespace()
6767
{
6868
await new AnalyzerTest<ApiMappingAnalyzer>()
6969
.WithSource("using Windows.ApplicationModel.Background; class C {}")

src/tools/winui-analyzer/Microsoft.WindowsAppSDK.Analyzers.Tests/Rules/AttachedPropertyAnalyzerTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Microsoft.WindowsAppSDK.Analyzers.Tests.Rules;
1010
public sealed class AttachedPropertyAnalyzerTests
1111
{
1212
[Fact]
13-
public async Task Wui2030_FlagsNestedAutomationPropertiesInitializer()
13+
public async Task Wui2030FlagsNestedAutomationPropertiesInitializer()
1414
{
1515
await new AnalyzerTest<AttachedPropertyAnalyzer>()
1616
.WithSource(@"
@@ -23,7 +23,7 @@ class C { void M() {
2323
}
2424

2525
[Fact]
26-
public async Task Wui2030_DoesNotFlagSimpleInitializer()
26+
public async Task Wui2030DoesNotFlagSimpleInitializer()
2727
{
2828
await new AnalyzerTest<AttachedPropertyAnalyzer>()
2929
.WithSource(@"
@@ -33,7 +33,7 @@ class Button { public string? Content { get; set; } }
3333
}
3434

3535
[Fact]
36-
public async Task Wui2030_DoesNotFlagUnrelatedNestedInitializer()
36+
public async Task Wui2030DoesNotFlagUnrelatedNestedInitializer()
3737
{
3838
// FP guard: nested initializer on a non-attached-property type.
3939
await new AnalyzerTest<AttachedPropertyAnalyzer>()

src/tools/winui-analyzer/Microsoft.WindowsAppSDK.Analyzers.Tests/Rules/GenAiApiAnalyzerTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Microsoft.WindowsAppSDK.Analyzers.Tests.Rules;
1010
public sealed class GenAiApiAnalyzerTests
1111
{
1212
[Fact]
13-
public async Task Wui4101_FlagsSetInputSequences()
13+
public async Task Wui4101FlagsSetInputSequences()
1414
{
1515
await new AnalyzerTest<GenAiApiAnalyzer>()
1616
.WithSource(@"
@@ -21,7 +21,7 @@ class GeneratorParams { public void SetInputSequences(object s) {} }
2121
}
2222

2323
[Fact]
24-
public async Task Wui4102_FlagsComputeLogits()
24+
public async Task Wui4102FlagsComputeLogits()
2525
{
2626
await new AnalyzerTest<GenAiApiAnalyzer>()
2727
.WithSource(@"
@@ -32,7 +32,7 @@ class Generator { public void ComputeLogits() {} }
3232
}
3333

3434
[Fact]
35-
public async Task Wui4103_FlagsTokenizerStreamCtor()
35+
public async Task Wui4103FlagsTokenizerStreamCtor()
3636
{
3737
await new AnalyzerTest<GenAiApiAnalyzer>()
3838
.WithSource(@"
@@ -44,7 +44,7 @@ class TokenizerStream { public TokenizerStream(Tokenizer t) {} }
4444
}
4545

4646
[Fact]
47-
public async Task GenAi_DoesNotFlagUnrelatedClean()
47+
public async Task GenAiDoesNotFlagUnrelatedClean()
4848
{
4949
await new AnalyzerTest<GenAiApiAnalyzer>()
5050
.WithSource(@"

src/tools/winui-analyzer/Microsoft.WindowsAppSDK.Analyzers.Tests/Rules/MvvmPatternAnalyzerTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Microsoft.WindowsAppSDK.Analyzers.Tests.Rules;
1010
public sealed class MvvmPatternAnalyzerTests
1111
{
1212
[Fact]
13-
public async Task Wui3001_FlagsFieldBackedObservableProperty()
13+
public async Task Wui3001FlagsFieldBackedObservableProperty()
1414
{
1515
await new AnalyzerTest<MvvmPatternAnalyzer>()
1616
.WithSource(@"
@@ -22,7 +22,7 @@ partial class VM { [ObservableProperty] private string _name = """"; }")
2222
}
2323

2424
[Fact]
25-
public async Task Wui3001_DoesNotFlagPlainPrivateField()
25+
public async Task Wui3001DoesNotFlagPlainPrivateField()
2626
{
2727
await new AnalyzerTest<MvvmPatternAnalyzer>()
2828
.WithSource(@"
@@ -31,7 +31,7 @@ class VM { private string _name = """"; }")
3131
}
3232

3333
[Fact]
34-
public async Task Wui3001_DoesNotFlagFieldWithUnrelatedAttribute()
34+
public async Task Wui3001DoesNotFlagFieldWithUnrelatedAttribute()
3535
{
3636
await new AnalyzerTest<MvvmPatternAnalyzer>()
3737
.WithSource(@"

src/tools/winui-analyzer/Microsoft.WindowsAppSDK.Analyzers.Tests/Rules/SuppressionTests.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public sealed class SuppressionTests
2121
{
2222
// ─── WUI0001 — UWP XAML namespace ────────────────────────────────────────
2323
[Fact]
24-
public async Task Suppress_Wui0001()
24+
public async Task SuppressWui0001()
2525
{
2626
await new AnalyzerTest<UwpApiAnalyzer>()
2727
.WithSource(@"
@@ -34,7 +34,7 @@ namespace Sample { class C {} }")
3434

3535
// ─── WUI0002 — Window.Current ────────────────────────────────────────────
3636
[Fact]
37-
public async Task Suppress_Wui0002()
37+
public async Task SuppressWui0002()
3838
{
3939
await new AnalyzerTest<UwpApiAnalyzer>()
4040
.WithSource(@"
@@ -49,7 +49,7 @@ class App { void M() {
4949

5050
// ─── WUI0004 — GetForCurrentView ─────────────────────────────────────────
5151
[Fact]
52-
public async Task Suppress_Wui0004()
52+
public async Task SuppressWui0004()
5353
{
5454
await new AnalyzerTest<UwpApiAnalyzer>()
5555
.WithSource(@"
@@ -64,7 +64,7 @@ class App { void M() {
6464

6565
// ─── WUI2001 — TabView raw content ───────────────────────────────────────
6666
[Fact]
67-
public async Task Suppress_Wui2001()
67+
public async Task SuppressWui2001()
6868
{
6969
await new AnalyzerTest<TabViewContentAnalyzer>()
7070
.WithSource(@"
@@ -81,7 +81,7 @@ class C { void M() {
8181

8282
// ─── WUI3001 — Old MVVM syntax ───────────────────────────────────────────
8383
[Fact]
84-
public async Task Suppress_Wui3001()
84+
public async Task SuppressWui3001()
8585
{
8686
await new AnalyzerTest<MvvmPatternAnalyzer>()
8787
.WithSource(@"
@@ -97,7 +97,7 @@ partial class VM {
9797

9898
// ─── WUI4001 — WebView2 NavigateToString without init ────────────────────
9999
[Fact]
100-
public async Task Suppress_Wui4001()
100+
public async Task SuppressWui4001()
101101
{
102102
await new AnalyzerTest<WebView2InitAnalyzer>()
103103
.WithSource(@"
@@ -112,7 +112,7 @@ class WebView2 { public void NavigateToString(string s) {} }
112112

113113
// ─── WUI4101 — GenAI SetInputSequences ───────────────────────────────────
114114
[Fact]
115-
public async Task Suppress_Wui4101()
115+
public async Task SuppressWui4101()
116116
{
117117
await new AnalyzerTest<GenAiApiAnalyzer>()
118118
.WithSource(@"
@@ -127,7 +127,7 @@ class GeneratorParams { public void SetInputSequences(object s) {} }
127127

128128
// ─── WUI4102 — GenAI ComputeLogits ───────────────────────────────────────
129129
[Fact]
130-
public async Task Suppress_Wui4102()
130+
public async Task SuppressWui4102()
131131
{
132132
await new AnalyzerTest<GenAiApiAnalyzer>()
133133
.WithSource(@"
@@ -142,7 +142,7 @@ class Generator { public void ComputeLogits() {} }
142142

143143
// ─── WUI4103 — GenAI TokenizerStream ctor ────────────────────────────────
144144
[Fact]
145-
public async Task Suppress_Wui4103()
145+
public async Task SuppressWui4103()
146146
{
147147
await new AnalyzerTest<GenAiApiAnalyzer>()
148148
.WithSource(@"
@@ -158,7 +158,7 @@ class TokenizerStream { public TokenizerStream(Tokenizer t) {} }
158158

159159
// ─── WUI2030 — Attached property nested initializer ──────────────────────
160160
[Fact]
161-
public async Task Suppress_Wui2030()
161+
public async Task SuppressWui2030()
162162
{
163163
await new AnalyzerTest<AttachedPropertyAnalyzer>()
164164
.WithSource(@"
@@ -173,7 +173,7 @@ class C { void M() {
173173

174174
// ─── WUI1001 — API mapping (data-driven) ─────────────────────────────────
175175
[Fact]
176-
public async Task Suppress_Wui1001()
176+
public async Task SuppressWui1001()
177177
{
178178
await new AnalyzerTest<ApiMappingAnalyzer>()
179179
.WithSource(@"

src/tools/winui-analyzer/Microsoft.WindowsAppSDK.Analyzers.Tests/Rules/TabViewContentAnalyzerTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Microsoft.WindowsAppSDK.Analyzers.Tests.Rules;
1010
public sealed class TabViewContentAnalyzerTests
1111
{
1212
[Fact]
13-
public async Task Wui2001_FlagsRawTextBoxAsTabContent()
13+
public async Task Wui2001FlagsRawTextBoxAsTabContent()
1414
{
1515
// Heuristic fallback path: variable named "tab*" + raw control assignment.
1616
await new AnalyzerTest<TabViewContentAnalyzer>()
@@ -23,7 +23,7 @@ class TabViewItem { public object? Content { get; set; } }
2323
}
2424

2525
[Fact]
26-
public async Task Wui2001_DoesNotFlagFrameAsContent()
26+
public async Task Wui2001DoesNotFlagFrameAsContent()
2727
{
2828
await new AnalyzerTest<TabViewContentAnalyzer>()
2929
.WithSource(@"
@@ -34,7 +34,7 @@ class TabViewItem { public object? Content { get; set; } }
3434
}
3535

3636
[Fact]
37-
public async Task Wui2001_DoesNotFlagContentAssignmentOnNonTabType()
37+
public async Task Wui2001DoesNotFlagContentAssignmentOnNonTabType()
3838
{
3939
// False-positive guard: ContentControl.Content assignment on non-tab variable.
4040
await new AnalyzerTest<TabViewContentAnalyzer>()

src/tools/winui-analyzer/Microsoft.WindowsAppSDK.Analyzers.Tests/Rules/UwpApiAnalyzerTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public sealed class UwpApiAnalyzerTests
1212
{
1313
// ─── WUI0001 — UWP XAML namespace ────────────────────────────────────────
1414
[Fact]
15-
public async Task Wui0001_FlagsUsingWindowsUiXaml()
15+
public async Task Wui0001FlagsUsingWindowsUiXaml()
1616
{
1717
await new AnalyzerTest<UwpApiAnalyzer>()
1818
.WithSource(@"
@@ -23,7 +23,7 @@ namespace Sample { class C {} }")
2323
}
2424

2525
[Fact]
26-
public async Task Wui0001_DoesNotFlagMicrosoftUiXaml()
26+
public async Task Wui0001DoesNotFlagMicrosoftUiXaml()
2727
{
2828
await new AnalyzerTest<UwpApiAnalyzer>()
2929
.WithSource(@"
@@ -33,7 +33,7 @@ namespace Microsoft.UI.Xaml { class Window {} }
3333
}
3434

3535
[Fact]
36-
public async Task Wui0001_DoesNotFlagSimilarlyNamedUserNamespace()
36+
public async Task Wui0001DoesNotFlagSimilarlyNamedUserNamespace()
3737
{
3838
// False-positive guard: a user namespace called "Windows.UI.XamlSomething" should not match
3939
// (we use StartsWith("Windows.UI.Xaml") which would actually match this — guard test
@@ -47,7 +47,7 @@ namespace Contoso.Windows.UI.Xaml { class C {} }
4747

4848
// ─── WUI0002 — Window.Current ────────────────────────────────────────────
4949
[Fact]
50-
public async Task Wui0002_FlagsWindowCurrent()
50+
public async Task Wui0002FlagsWindowCurrent()
5151
{
5252
await new AnalyzerTest<UwpApiAnalyzer>()
5353
.WithSource(@"
@@ -59,7 +59,7 @@ class App { void M() { var w = Window.Current; } }")
5959

6060
// ─── WUI0004 — GetForCurrentView ─────────────────────────────────────────
6161
[Fact]
62-
public async Task Wui0004_FlagsGetForCurrentView()
62+
public async Task Wui0004FlagsGetForCurrentView()
6363
{
6464
await new AnalyzerTest<UwpApiAnalyzer>()
6565
.WithSource(@"
@@ -70,7 +70,7 @@ class App { void M() { var s = StatusBar.GetForCurrentView(); } }")
7070
}
7171

7272
[Fact]
73-
public async Task Wui0004_DoesNotFlagConnectedAnimationServiceAllowlist()
73+
public async Task Wui0004DoesNotFlagConnectedAnimationServiceAllowlist()
7474
{
7575
// False-positive guard: ConnectedAnimationService.GetForCurrentView() still works in WinUI 3
7676
await new AnalyzerTest<UwpApiAnalyzer>()
@@ -82,7 +82,7 @@ class App { void M() { var s = ConnectedAnimationService.GetForCurrentView(); }
8282

8383
// ─── Suppression ─────────────────────────────────────────────────────────
8484
[Fact]
85-
public async Task Suppression_PragmaSuppressesWui0001()
85+
public async Task SuppressionPragmaSuppressesWui0001()
8686
{
8787
await new AnalyzerTest<UwpApiAnalyzer>()
8888
.WithSource(@"

src/tools/winui-analyzer/Microsoft.WindowsAppSDK.Analyzers.Tests/Rules/WebView2InitAnalyzerTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Microsoft.WindowsAppSDK.Analyzers.Tests.Rules;
1010
public sealed class WebView2InitAnalyzerTests
1111
{
1212
[Fact]
13-
public async Task Wui4001_FlagsNavigateToStringWithoutInit()
13+
public async Task Wui4001FlagsNavigateToStringWithoutInit()
1414
{
1515
await new AnalyzerTest<WebView2InitAnalyzer>()
1616
.WithSource(@"
@@ -21,7 +21,7 @@ class WebView2 { public void NavigateToString(string s) {} }
2121
}
2222

2323
[Fact]
24-
public async Task Wui4001_DoesNotFlagWhenEnsureCoreWebView2AsyncPresent()
24+
public async Task Wui4001DoesNotFlagWhenEnsureCoreWebView2AsyncPresent()
2525
{
2626
await new AnalyzerTest<WebView2InitAnalyzer>()
2727
.WithSource(@"
@@ -33,7 +33,7 @@ class WebView2 { public Task EnsureCoreWebView2Async() => Task.CompletedTask; pu
3333
}
3434

3535
[Fact]
36-
public async Task Wui4001_DoesNotFlagUnrelatedNavigateOnNonWebViewType()
36+
public async Task Wui4001DoesNotFlagUnrelatedNavigateOnNonWebViewType()
3737
{
3838
// FP guard: an unrelated class with a Navigate() method should not flag.
3939
await new AnalyzerTest<WebView2InitAnalyzer>()

0 commit comments

Comments
 (0)