Cleanup: remove redundant qualifiers, parens, opens, 'new' keywords#19002
Merged
T-Gro merged 7 commits intodotnet:mainfrom Nov 6, 2025
Merged
Cleanup: remove redundant qualifiers, parens, opens, 'new' keywords#19002T-Gro merged 7 commits intodotnet:mainfrom
T-Gro merged 7 commits intodotnet:mainfrom
Conversation
Contributor
|
15920da to
ccdd24d
Compare
edgarfgp
approved these changes
Oct 15, 2025
Member
Author
|
@T-Gro This is ready. |
T-Gro
approved these changes
Oct 24, 2025
There was a problem hiding this comment.
Pull Request Overview
This PR performs a cleanup of the codebase by removing redundant qualifiers, parentheses, open statements, and new keywords across both test and source files to improve code clarity and consistency.
Key Changes
- Removal of redundant type qualifiers (e.g.,
System.String→String,Range.mkRange→mkRange) - Removal of unnecessary parentheses in function parameters and pattern matching
- Elimination of unused
openstatements - Replacement of explicit
newkeyword with direct constructor calls where applicable
Reviewed Changes
Copilot reviewed 228 out of 228 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/FSharp.Compiler.Service.Tests/SourceTextTests.fs | Removed Range. qualifier from mkRange calls |
| tests/FSharp.Compiler.Service.Tests/ServiceUntypedParseTests.fs | Removed redundant parentheses from InlineData attribute arguments |
| tests/FSharp.Compiler.Service.Tests/ScriptOptionsTests.fs | Removed parentheses around function parameter |
| tests/FSharp.Compiler.Service.Tests/RangeTests.fs | Removed unused open FSharp.Compiler.Text statement |
| tests/FSharp.Compiler.Service.Tests/ProjectAnalysisTests.fs | Removed redundant parentheses in filter predicate |
| tests/FSharp.Compiler.Service.Tests/ProductVersion.fs | Removed System. qualifiers and unused opens; simplified tuple patterns |
| tests/FSharp.Compiler.Service.Tests/ParserTests.fs | Removed redundant parentheses in pattern matching |
| tests/FSharp.Compiler.Service.Tests/ManglingNameOfProvidedTypes.fs | Removed unused open statements |
| tests/FSharp.Compiler.Service.Tests/HashIfExpression.fs | Removed redundant parentheses |
| tests/FSharp.Compiler.Service.Tests/FsiTests.fs | Removed unused open statements |
| tests/FSharp.Compiler.Service.Tests/FSharpExprPatternsTests.fs | Removed redundant parentheses in pattern matching |
| tests/FSharp.Compiler.Service.Tests/ExprTests.fs | Removed Utils. qualifier and redundant parentheses |
| tests/FSharp.Compiler.Service.Tests/Common.fs | Removed unused open statement |
| tests/FSharp.Compiler.Service.Tests/ByteMemoryTests.fs | Removed unused open statements |
| tests/FSharp.Compiler.Service.Tests/BuildGraphTests.fs | Removed Tasks. qualifier from Parallel.Invoke |
| tests/FSharp.Compiler.Service.Tests/BlockTests.fs | Removed unused open statement |
| tests/FSharp.Compiler.Service.Tests/AssemblySigningAttributes.fs | Removed unused open statement |
| tests/FSharp.Compiler.Service.Tests/AssemblyContentProviderTests.fs | Removed unused open statement |
| src/FSharp.Core/tasks.fs | Removed unused opens and redundant parentheses in function parameters |
| src/FSharp.Core/string.fs | Removed new keyword and redundant parentheses |
| src/FSharp.Core/set.fsi | Removed System. qualifiers and unused open statements |
| src/FSharp.Core/set.fs | Removed unused opens, new keyword, and redundant parentheses |
| src/FSharp.Core/seqcore.fsi | Removed unused open and System. qualifiers |
| src/FSharp.Core/seqcore.fs | Removed unused opens, System. qualifiers, and new keyword |
| src/FSharp.Core/seq.fsi | Removed redundant parentheses in type parameters |
| src/FSharp.Core/seq.fs | Removed unused opens, System. qualifiers, and redundant parentheses |
| src/FSharp.Core/resumable.fsi | Removed redundant qualifier |
| src/FSharp.Core/resumable.fs | Removed unused opens and redundant parentheses |
| src/FSharp.Core/reflect.fsi | Removed unused open statements |
| src/FSharp.Core/reflect.fs | Removed unused opens, redundant parentheses, and simplified tuple patterns |
| src/FSharp.Core/quotations.fsi | Removed System. qualifiers and redundant parentheses |
| src/FSharp.Core/quotations.fs | Removed unused opens, System. and other qualifiers, new keyword, and redundant parentheses |
| src/FSharp.Core/printf.fsi | Removed unused open and System. qualifier |
| src/FSharp.Core/printf.fs | Removed unused opens, System. qualifiers, and redundant formatting |
| src/FSharp.Core/prim-types.fsi | Removed System. qualifiers throughout |
| src/FSharp.Core/prim-types.fs | Removed unused opens, System. qualifiers, new keyword, and simplified various constructs |
| src/FSharp.Core/prim-types-prelude.fsi | Removed System. qualifiers from type abbreviations |
| src/FSharp.Core/observable.fsi | Removed System. qualifier |
| src/FSharp.Core/nativeptr.fsi | Removed unused open statement |
| src/FSharp.Core/nativeptr.fs | Removed unused open statements |
| src/FSharp.Core/math/z.fsi | Removed unused open statement |
| src/FSharp.Core/math/z.fs | Removed unused opens, new keyword, and simplified conditions |
| src/FSharp.Core/map.fsi | Removed System. qualifier |
| src/FSharp.Core/map.fs | Removed redundant parentheses, new keyword, and System. qualifiers |
| src/FSharp.Core/mailbox.fsi | Removed redundant parentheses |
| src/FSharp.Core/mailbox.fs | Removed redundant parentheses, new keyword, and System. qualifiers |
| src/FSharp.Core/local.fs | Removed unused opens and new keyword |
| src/FSharp.Core/list.fsi | Removed unused open statement |
| src/FSharp.Core/list.fs | Removed unused opens and qualifiers |
| src/FSharp.Core/fslib-extra-pervasives.fsi | Removed unused opens and System. qualifiers |
| src/FSharp.Core/fslib-extra-pervasives.fs | Removed unused opens, System. qualifiers, and simplified various constructs |
| src/FSharp.Core/eventmodule.fs | Removed new keyword |
| src/FSharp.Core/event.fsi | Removed unused opens and simplified type constraint formatting |
| src/FSharp.Core/event.fs | Removed unused opens, System. qualifiers, and new keyword |
| src/FSharp.Core/collections.fsi | Removed unused open statements |
| src/FSharp.Core/collections.fs | Removed unused open and redundant parentheses |
| src/FSharp.Core/async.fsi | Removed System. qualifiers |
| src/FSharp.Core/async.fs | Removed redundant parentheses, simplified type aliases, and removed qualifiers |
| src/FSharp.Core/array3.fsi | Removed unused open statements |
| src/FSharp.Core/array3.fs | Removed unused open statements |
| src/FSharp.Core/array2.fsi | Removed unused open statements |
| src/FSharp.Core/array2.fs | Removed unused open statement |
| src/FSharp.Core/array.fsi | Removed unused open statement |
| src/FSharp.Core/array.fs | Removed unused opens, new keyword, System. qualifiers, and simplified constructs |
| src/FSharp.Core/Random.fs | Removed unused open statement |
| src/FSharp.Core/QueryExtensions.fs | Removed unused opens and redundant parentheses |
| src/FSharp.Core/Query.fsi | Removed System.Linq. qualifiers |
| src/FSharp.Core/Query.fs | Removed unused opens, qualifiers, and simplified method references throughout |
| src/FSharp.Core/MutableTuple.fs | Removed unused open statements |
| src/FSharp.Core/Linq.fsi | Removed System. qualifier |
| src/Compiler/Utilities/sr.fs | Removed redundant parentheses |
| src/Compiler/Utilities/sformat.fsi | Removed unused open statement |
| src/Compiler/Utilities/lib.fsi | Removed redundant parentheses |
| src/Compiler/Utilities/PathMap.fs | Removed unused open statement |
| src/Compiler/Utilities/LruCache.fs | Removed unused open and simplified lambda |
abonie
approved these changes
Oct 24, 2025
This was referenced Nov 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cleans up various not required things.