-
Notifications
You must be signed in to change notification settings - Fork 832
Cleanup: remove redundant qualifiers, parens, opens, 'new' keywords #19002
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
base: main
Are you sure you want to change the base?
Conversation
|
15920da to
ccdd24d
Compare
|
@T-Gro This is ready. |
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 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 |
Cleans up various not required things.