-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Enable IDE0060 (Remove unused parameter) analyzer #72667
Changes from 17 commits
16324e9
b1b649d
b0dbc52
e7841ee
125cbc4
4a0d7df
a2e2fd6
ede33c7
b2b2613
396bea5
7284e45
e8677dd
13205a6
56c102a
bc25d3a
836c3dd
5d9ed3c
6f9069b
77b53f1
772bf45
acb8fa6
03452b6
e2c38fc
b433680
a425dd4
5500d4e
5a57366
7f24191
e73bf3b
5c43b8e
676694c
8122752
a5f75b9
81d04fc
84f99cc
a84e4f2
7ec3a88
56e6aff
098409e
b63a8fa
782e0fa
5be3227
e7c42fd
bc2f0b6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ public static void InitializeArray(Array array, RuntimeFieldHandle fldHandle) | |
throw new PlatformNotSupportedException(); | ||
} | ||
|
||
#pragma warning disable IDE0060 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I still think we should update IDE0060 to not warn in cases where the method simply throws {Platform}NotSupportedException. Warning about unused parameters in such cases seems superfluous. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there an issue tracking this? |
||
private static unsafe void* GetSpanDataFrom( | ||
RuntimeFieldHandle fldHandle, | ||
RuntimeTypeHandle targetTypeHandle, | ||
|
@@ -36,6 +37,7 @@ public static void InitializeArray(Array array, RuntimeFieldHandle fldHandle) | |
// https://github.com/dotnet/corert/issues/364 | ||
throw new PlatformNotSupportedException(); | ||
} | ||
#pragma warning disable IDE0060 | ||
|
||
[RequiresUnreferencedCode("Trimmer can't guarantee existence of class constructor")] | ||
public static void RunClassConstructor(RuntimeTypeHandle type) | ||
|
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.
Why is this needed rather than removing throwOnError? If mono or nativeaot are doing additional validation that coreclr isn't, is that an issue?
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.
There is rather uncommon error handling on non-Windows platforms. See
runtime/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.NoCom.cs
Line 177 in 49751b2
runtime/src/libraries/System.Private.CoreLib/src/System/Type.cs
Line 464 in 49751b2