[Feature Request] Option for keeping the opening braces on the same line as corresponing definition / expression
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- csharp
- Ambito
- developer-experience
Direzione di ricerca
Start by reading issue #1088, which the report says may cover related formatting options, then trace how ILSpy formats decompiled C# and how View → Options exposes settings. The request is to add an option that places opening braces on the same line across decompiled code; done means the setting is available and the shown examples follow it. The issue names no files or tests, so locating the formatter and relevant tests will take project familiarity.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem? Please describe.
I am always frustrated with the current standard C# (and C++ at that matter) formatting style where the opening brace is put on the next line, rather than kept on the same line like formatting style of most other programming languages (do I even need to name examples?). These next line opening braces are just eating up valuable vertical space, since most monitors today have ratio of 16:9 or more and are put horizontally.
And, IMHO, putting these braces on a next line doesn't help code readability, as it actively harms it by wasting precious screen space and, in my experience, doesn't help identify the beginning block as it is already enough for me to search for a keyword or a type on the same vertical line (and in most code editors show the vertical lines that span the white space from start of the block to its end) in order to identify what code is in what blocks.
Describe the solution you'd like
I would like to have an option in the View -> Options -> Display (or in Decompiler section) to get rid of all instances of next line opening braces in all circumstances.
I want the decompiled code to look like this (example from System.Private.CoreLib System.AppDomain):
public static AppDomain CurrentDomain {
get {
if (s_domain == null) {
Interlocked.CompareExchange(ref s_domain, new AppDomain(), null);
}
return s_domain;
}
}
instead of current:
public static AppDomain CurrentDomain
{
get
{
if (s_domain == null)
{
Interlocked.CompareExchange(ref s_domain, new AppDomain(), null);
}
return s_domain;
}
}
This issue may be subsumed into https://github.com/icsharpcode/ILSpy/issues/1088, but this, I think, may be implemented regardless of this feature
- Lingua principale
- C#
- Stelle
- 26.8k
- Fork
- 3.8k
- Merge medio
- 1g 4h
- PR unite (30g)
- 69
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di icsharpcode/ILSpy
-
AvaloniaEdit Issues to dateApertaExternal UI
Difficoltà 1/5 1-3 ore Idoneità per principianti 75/100
icsharpcode/ILSpy#4284 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
icsharpcode/ILSpy#4275 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
icsharpcode/ILSpy#4295 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug Decompiler
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
icsharpcode/ILSpy#4280 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Bug Decompiler
Difficoltà 3/5 1-2 giorni Idoneità per principianti 66/100
icsharpcode/ILSpy#4279 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di icsharpcode/ILSpy
Issue simili
-
[Bug] Dashboard renders attachment links that resolve to 404 when the FILES binding is absentApertabug 優先: 低
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
.NET area: storage bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Larson-Logan/medal-sync#61 ·
I maintainer di solito rispondono entro 1 giorno
-
area-ai bug untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
dotnet/extensions#7893 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100