C_Cpp.vcFormat.space.withinSquareBrackets bug on first line
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- c, cpp, typescript
- Bereich
- tooling
Rechercherichtung
Reproduziere das Problem in VS Code mit aktiviertem C_Cpp.vcFormat.space.withinSquareBrackets und dem Designated-Initializer-Beispiel aus dem Bericht. Verfolge den von der Erweiterung verwendeten C/C++-Formatierungspfad; abgeschlossen ist die Aufgabe, wenn der erste Array-Initializer Leerzeichen innerhalb seiner Klammern erhält und damit den späteren Initializern entspricht.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Environment
- OS and Version: Mac OS Ventura 13.2.1
- VS Code Version: 1.75.1
- C/C++ Extension Version: 1.14.3
- If using SSH remote, specify OS of remote machine: N/A
Bug Summary and Steps to Reproduce
Bug Summary:
C_Cpp.vcFormat.space.withinSquareBrackets setting doesn't insert a space within the square brackets for the first designated initializer for an array.
Steps to reproduce:
- Set
"C_Cpp.vcFormat.space.withinSquareBrackets": true,insettings.json. - Create a new C file
- Put in this code:
int array[] = {
[0] = 0,
[1] = 1,
[2] = 2,
};
- Format with C/C++.
Code should be formatted to
int array[] = {
[ 0 ] = 0,
[ 1 ] = 1,
[ 2 ] = 2,
};
Instead, the file is formatted to
int array[] = {
[0] = 0,
[ 1 ] = 1,
[ 2 ] = 2,
};
Configuration and Logs
"C_Cpp.vcFormat.indent.caseLabels": true,
"C_Cpp.vcFormat.indent.preserveWithinParentheses": false,
"C_Cpp.vcFormat.indent.multiLineRelativeTo": "outermostParenthesis",
"C_Cpp.vcFormat.wrap.preserveBlocks": "never",
"C_Cpp.vcFormat.newLine.beforeOpenBrace.block": "newLine",
"C_Cpp.vcFormat.newLine.beforeOpenBrace.function": "newLine",
"C_Cpp.vcFormat.newLine.beforeOpenBrace.namespace": "sameLine",
"C_Cpp.vcFormat.newLine.beforeOpenBrace.type": "sameLine",
"C_Cpp.vcFormat.newLine.beforeWhileInDoWhile": true,
"C_Cpp.vcFormat.newLine.closeBraceSameLine.emptyFunction": true,
"C_Cpp.vcFormat.newLine.closeBraceSameLine.emptyType": true,
"C_Cpp.vcFormat.space.aroundAssignmentOperator": "ignore",
"C_Cpp.vcFormat.space.beforeBlockOpenBrace": true,
"C_Cpp.vcFormat.space.beforeInitializerListOpenBrace": true,
"C_Cpp.vcFormat.space.afterCastCloseParenthesis": true,
"C_Cpp.vcFormat.space.betweenEmptyParameterListParentheses": false,
"C_Cpp.vcFormat.space.betweenEmptyBraces": true,
"C_Cpp.vcFormat.space.betweenEmptySquareBrackets": false,
"C_Cpp.vcFormat.space.pointerReferenceAlignment": "left",
"C_Cpp.vcFormat.space.withinCastParentheses": true,
"C_Cpp.vcFormat.space.withinControlFlowStatementParentheses": true,
"C_Cpp.vcFormat.space.withinExpressionParentheses": true,
"C_Cpp.vcFormat.space.withinLambdaBrackets": true,
"C_Cpp.vcFormat.space.withinParameterListParentheses": true,
"C_Cpp.vcFormat.space.withinSquareBrackets": true,
"C_Cpp.vcFormat.space.withinInitializerListBraces": true,
"C_Cpp.vcFormat.space.removeAroundMemberOperators": false,
"C_Cpp.formatting": "vcFormat",
Other Extensions
N/A
Additional context
No response
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.2k
- Forks
- 1.7k
- Ø Merge
- 14 Std. 46 Min.
- Gemergte PRs (30 T.)
- 61
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/vscode-cpptools
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
microsoft/vscode-cpptools#14787 ·
-
[Bug] cpptools fails to start on Ubuntu ARM64 due to missing execute permissions on shared libraries Offenbug fixed Language Service regression
microsoft/vscode-cpptools#14779 · 1 zugewiesene Person ·
-
Language Service more info needed
microsoft/vscode-cpptools#14778 · 1 Kommentar · 1 zugewiesene Person ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 64/100
microsoft/vscode-cpptools#14769 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
microsoft/vscode-cpptools#14768 · 1 Kommentar ·
Alle Issues in microsoft/vscode-cpptools
Ähnliche Issues
-
comp/dashboard P3 type/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
NousResearch/hermes-agent#117722 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 76/100
-
code-quality refactoring
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
langchain-ai/deepagents#6450 ·