-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
Prettify decompiled code #311
Comments
for example here is checking if secret is null so would be nice if the variable could be named something like the from public async Task<bool> Remove(string secret)
{
bool flag = secret == null;
if (flag)
{
throw new ArgumentNullException("secret");
}
return await JSPasteClient.Remove(this._key, secret);
} to public async Task<bool> Remove(string secret)
{
bool secretNull = secret == null;
if (secretNull)
{
throw new ArgumentNullException("secret");
}
return await JSPasteClient.Remove(this._key, secret);
} |
also put some new lines to some code like for ifs |
and the nullables replace it with the '?' like in normal code from this [Nullable(2)]
public string Password
{
[NullableContext(2)]
get;
[NullableContext(2)]
set;
} to this public string? Password { get; set; } |
Nullable support is available in new-ilspy branch, and local name generation might be also changed a bit |
If I get a new idea I will post it here |
I don't even know how this would work. This is a purely subjective feature. Your idea of "prettyfying" the branches into single lines is horrible in my opinion. Branches should objectively always be wrapped in a scope so you don't fall for the famous apple Apple var a = SomeClass1.Abc();
var b = SomeClass2.Xyz(); vs var a = SomeClass1.Abc();
var b = SomeClass2.Xyz(); In regards to the nullability issue, that's the only valid concern that I see and its already fixed by a newer version of ILSpy. It looks like this has already been suggested: #2 |
Ok you're right |
Problem Description
Prettify code from this
to something more like this
Proposal
It would be great to prettify some ifs if the bool definition isn't too big
also would be great if the variables could get more family-friendly names like
from this
to this
Alternatives
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: