Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterator modifier removed when applying mark member as static fixer in VB #7434

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1635,5 +1635,27 @@
""",
}.RunAsync();
}

[Fact]
public async Task TestBasic_Iterator_ModifierRemoved()
{
await VerifyVB.VerifyCodeFixAsync(@"
Imports System
Imports System.Collections.Generic
Public Class MembersTests
Public Iterator Function [|Method1|]() As IEnumerable(Of Integer)
Yield 1
End Function
End Class",
@"
Imports System
Imports System.Collections.Generic
Public Class MembersTests
Public Shared Iterator Function Method1() As IEnumerable(Of Integer)
Yield 1
End Function
End Class");
}

}

Check failure on line 1660 in src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/MarkMembersAsStaticTests.Fixer.cs

View check run for this annotation

Azure Pipelines / roslyn-analyzers-CI (Ubuntu Debug)

src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/MarkMembersAsStaticTests.Fixer.cs#L1660

src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/MarkMembersAsStaticTests.Fixer.cs(1660,5): error IDE2002: (NETCORE_ENGINEERING_TELEMETRY=Build) Consecutive braces must not have blank line between them (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide2002)

Check failure on line 1660 in src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/MarkMembersAsStaticTests.Fixer.cs

View check run for this annotation

Azure Pipelines / roslyn-analyzers-CI (Ubuntu Release)

src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/MarkMembersAsStaticTests.Fixer.cs#L1660

src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/MarkMembersAsStaticTests.Fixer.cs(1660,5): error IDE2002: (NETCORE_ENGINEERING_TELEMETRY=Build) Consecutive braces must not have blank line between them (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide2002)

Check failure on line 1660 in src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/MarkMembersAsStaticTests.Fixer.cs

View check run for this annotation

Azure Pipelines / roslyn-analyzers-CI

src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/MarkMembersAsStaticTests.Fixer.cs#L1660

src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/MarkMembersAsStaticTests.Fixer.cs(1660,5): error IDE2002: (NETCORE_ENGINEERING_TELEMETRY=Build) Consecutive braces must not have blank line between them (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide2002)

Check failure on line 1660 in src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/MarkMembersAsStaticTests.Fixer.cs

View check run for this annotation

Azure Pipelines / roslyn-analyzers-CI

src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/MarkMembersAsStaticTests.Fixer.cs#L1660

src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/MarkMembersAsStaticTests.Fixer.cs(1660,5): error IDE2002: (NETCORE_ENGINEERING_TELEMETRY=Build) Consecutive braces must not have blank line between them (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide2002)
}
Loading