[llvm-bugs] [Bug 50502] New: LLVM - VSCode AlignConsecutiveDeclarations not working

via llvm-bugs llvm-bugs at lists.llvm.org
Thu May 27 00:34:13 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50502

            Bug ID: 50502
           Summary: LLVM - VSCode AlignConsecutiveDeclarations not working
           Product: clang
           Version: 12.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jkopecky at sievers-group.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

I use the xaver.clang-format extension in VS Code.
AlignConsecutiveDeclarations: 'true' doesn't do anything, I cannot set it to
the values like 'AcrossEmptyLinesAndComments' though.

I get 'invalid argument' error

```JavaScript
let letVariable     = 5;
const constVariable = 10;
```

my setting:

```
---
Language:        JavaScript
BasedOnStyle:    Chromium
ColumnLimit:     100
BreakBeforeBraces: Allman

AlignConsecutiveAssignments: 'true'
AlignConsecutiveMacros: 'true'
AlignConsecutiveDeclarations: 'true'
AlignOperands: 'true'
AlignTrailingComments: 'true'
AllowShortBlocksOnASingleLine: 'false'
AllowShortCaseLabelsOnASingleLine: 'false'
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: 'false'
AllowShortLambdasOnASingleLine: 'false'
AllowShortLoopsOnASingleLine: 'false'
BinPackArguments: 'false'
BinPackParameters: 'false'
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: 'true'
BreakConstructorInitializers: BeforeColon
AlwaysBreakTemplateDeclarations: Yes
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
DerivePointerAlignment: 'false'
IncludeBlocks: Preserve
IndentCaseLabels: 'false'
IndentWidth: '4'
KeepEmptyLinesAtTheStartOfBlocks: 'true'
MaxEmptyLinesToKeep: '1'
NamespaceIndentation: 'None'
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
SortIncludes: 'true'
SpaceBeforeAssignmentOperators: 'true'
SpaceBeforeParens: ControlStatements
SpacesInAngles: false
SpacesInContainerLiterals: false
SpaceInEmptyParentheses: 'false'
SpacesInAngles: 'false'
SpacesInCStyleCastParentheses: 'false'
SpacesInParentheses: 'false'
TabWidth: '4'
UseTab: Never

```

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210527/a8b75849/attachment.html>


More information about the llvm-bugs mailing list