-
Notifications
You must be signed in to change notification settings - Fork 5.2k
More ILLink formatting fixes #117396
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
More ILLink formatting fixes #117396
Conversation
- Format ILCompiler.TrimmingTests - Fix ILLink.RoslynAnalyzer generated tests - Fix whitespace in comments and #if'd out code - Remove suppression for spacing around keywords
Tagging subscribers to this area: @dotnet/illink |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR applies broad formatting clean-ups across ILLink tests and related tooling code, aligning brace placement, using directives, comment whitespace, and editorconfig settings. It also updates expected diagnostic spans in Roslyn analyzer tests and corrects a few test directives.
- Reordered and grouped
using
directives for consistency. - Standardized brace placement and indentation in methods and properties.
- Updated expected warning locations in ILLink.RoslynAnalyzer test files.
- Removed the SA1000 suppression and fixed whitespace in comments and
#if
directives.
Reviewed Changes
Copilot reviewed 41 out of 302 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/tools/illink/test/Mono.Linker.Tests.Cases/Substitutions/FeatureGuardSubstitutionsDisabled.cs | Reordered using directives. |
src/tools/illink/test/Mono.Linker.Tests.Cases/Substitutions/FeatureGuardSubstitutions.cs | Reordered using directives. |
src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/ObjectGetType.cs | Reordered using directives. |
src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/EventHanderTypeGetInvokeMethod.cs | Standardized brace placement on overridden properties. |
src/tools/illink/test/Mono.Linker.Tests.Cases/Extensibility/CustomStepCanFixAbstractMethods.cs | Fixed ordering of using for dependency namespaces. |
src/tools/illink/test/Mono.Linker.Tests.Cases/DynamicDependencies/DynamicDependencyMethod.cs | Aligned whitespace around object creation and comments. |
src/tools/illink/test/Mono.Linker.Tests.Cases/DataFlow/FieldDataFlow.cs | Reordered using directives. |
src/tools/illink/test/Mono.Linker.Tests.Cases/DataFlow/ByRefDataflow.cs | Reordered using directives. |
src/tools/illink/test/Mono.Linker.Tests.Cases/DataFlow/FeatureGuardAttributeDataFlow.cs | Reordered using directives. |
src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UnusedAttributeOnReturnTypeIsRemoved.cs | Fixed whitespace in #if symbol. |
src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/UnconditionalSuppressMessageCodeFixTests.cs | Updated diagnostic spans for codefix tests. |
src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/RequiresUnreferencedCodeAnalyzerTests.cs | Updated diagnostic spans for analyzer tests. |
src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/RequiresDynamicCodeAnalyzerTests.cs | Updated diagnostic spans for analyzer tests. |
src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/RequiresAssemblyFilesAnalyzerTests.cs | Updated diagnostic spans for analyzer tests. |
src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/DynamicallyAccessedMembersCodeFixTests.cs | Updated diagnostic spans for codefix tests. |
src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/DynamicallyAccessedMembersAnalyzerTests.cs | Updated diagnostic spans and fixed a malformed instantiation. |
src/tools/illink/src/linker/Linker/TypeNameResolver.cs | Removed duplicate using . |
src/tools/illink/src/ILLink.Shared/TrimAnalysis/Intrinsics.cs | Cleaned up comment prefixes. |
src/tools/illink/external/Mono.Options/Options.cs | Reformatted class and method declarations to match style guide. |
src/tools/illink/.editorconfig | Removed the suppression for SA1000 (spacing around keywords). |
src/coreclr/tools/aot/ILCompiler.Trimming.Tests/Tests/DocumentationSignatureParserTests.cs | Adjusted brace placement in tests. |
src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmingTestLogger.cs | Standardized brace placement in lock statements. |
src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmingDriver.cs | Standardized brace placement in loops and conditionals. |
src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TrimmingArgumentBuilder.cs | Standardized brace placement in conditionals and loops. |
src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestRunner.cs | Standardized brace placement around try /catch . |
src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestInfraMultiFileCompilationModuleGroup.cs | Standardized brace placement in if statements. |
src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseMetadataProvider.cs | Standardized brace placement and grouping of using . |
src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseCompiler.cs | Standardized brace placement in method bodies. |
src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestCaseCollector.cs | Standardized brace placement in loops and conditionals. |
Comments suppressed due to low confidence (3)
src/tools/illink/test/Mono.Linker.Tests.Cases/DynamicDependencies/DynamicDependencyMethod.cs:198
- The instantiation syntax is malformed. It should be
new Impl()
with matching parentheses, e.g.var i = new Impl();
.
var i = new Impl ); // Avoid removal of non-implemented abstract methods
src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UnusedAttributeOnReturnTypeIsRemoved.cs:16
- The feature symbol is misspelled (
IL_ASSEMBLY_AVAIABLE
). It should readIL_ASSEMBLY_AVAILABLE
to match the intended conditional compilation symbol.
#if IL_ASSEMBLY_AVAIABLE
src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/DynamicallyAccessedMembersAnalyzerTests.cs:1415
- The object creation is missing its constructor invocation parentheses. It should be
new CRequires<TOuter>()
instead ofnew CRequires<TOuter>);
.
static CRequires<TOuter> Value => new CRequires<TOuter>);
...test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UnusedAttributeOnReturnTypeIsRemoved.cs
Outdated
Show resolved
Hide resolved
…eepUsed/UnusedAttributeOnReturnTypeIsRemoved.cs Co-authored-by: Jackson Schuster <[email protected]>
Follow-up to #116941.