Skip to content

Commit 7cb5808

Browse files
committed
Revert "first shot"
This reverts commit f0107a8.
1 parent f0107a8 commit 7cb5808

2 files changed

Lines changed: 0 additions & 32 deletions

File tree

src/CustomCode-Analyzer/Analyzer.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,14 +1373,6 @@ private static bool IsValidParameterType(ITypeSymbol typeSymbol, Compilation com
13731373
return false;
13741374
}
13751375

1376-
// If the type is nullable, unwrap it and check the underlying type
1377-
if (typeSymbol is INamedTypeSymbol named &&
1378-
named.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T &&
1379-
named.TypeArguments.Length == 1)
1380-
{
1381-
typeSymbol = named.TypeArguments[0];
1382-
}
1383-
13841376
// Check for primitive or special types
13851377
if (ValidParameterSpecialTypes.Contains(typeSymbol.SpecialType))
13861378
{

tests/CustomCode-Analyzer.Tests/AnalyzerTests.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,30 +1136,6 @@ await CSharpAnalyzerVerifier<Analyzer>.VerifyAnalyzerAsync(
11361136
);
11371137
}
11381138

1139-
[TestMethod]
1140-
public async Task UnsupportedParameterTypeRule_InGlobalScope_PublicField_NullableStruct_NoWarning()
1141-
{
1142-
var test =
1143-
@"
1144-
[OSStructure]
1145-
public struct NestedStructure
1146-
{
1147-
public int Value;
1148-
}
1149-
1150-
[OSStructure]
1151-
public struct MyStructure
1152-
{
1153-
public NestedStructure? NullableNested; // Nullable struct OK
1154-
}
1155-
";
1156-
await CSharpAnalyzerVerifier<Analyzer>.VerifyAnalyzerAsync(
1157-
test,
1158-
TestContext,
1159-
skipSDKreference: false
1160-
);
1161-
}
1162-
11631139
// --------------- ParameterByReferenceRule (OS-ELG-MODL-05016) ------------
11641140
[TestMethod]
11651141
public async Task ParameterByReferenceRule_InGlobalScope_ReportsWarning()

0 commit comments

Comments
 (0)