Menu

#5862 Prefer astyle 3.1 and update clang-format options

Fixed
Dan Eble
Scripts
2020-03-28
2020-03-24
Dan Eble
No

Change the preferred version of astyle from 2.04 to 3.1.

In a separate commit, add a few clang-format options to reduce
(slightly) the extent of changes that a subsequent fixcc.py makes.

Test procedure:
1. clang-format everything (version 9.0.0)
2. git commit
3. fixcc.py everything (astyle version 3.1)
4. git diff | wc -l

BASELINE                                          LINES
master@786c3669ff08804465a89013d349fc745fd783c9   19702

BENEFICIAL OPTIONS (TESTED INDIVIDUALLY)          LINES
ConstructorInitializerIndentWidth: 2              19062
ContinuationIndentWidth: 2                        15018
SpaceAfterCStyleCast: true                        19540
[Tested together]                                 14171

OTHER OPTIONS (TESTED INDIVIDUALLY)               LINES
AlignEscapedNewlines: Left                        19702
AlignOperands: false                              20760
AllowShortFunctionsOnASingleLine: InlineOnly      19708
AlwaysBreakTemplateDeclarations: MultiLine        19702
BinPackArguments: false                           21588
BinPackParameters: false                          20557
BreakBeforeTernaryOperators: true                 19702
BreakConstructorInitializers: BeforeColon         19702
BreakInheritanceList: BeforeColon                 19702
ColumnLimit: 80                                   19702
SortIncludes: false                               19702
SpaceAfterTemplateKeyword: false                  19702

https://codereview.appspot.com/551640043

Discussion

  • Anonymous

    Anonymous - 2020-03-24
    • Description has changed:

    Diff:

    
    
    • Needs: -->
    • Patch: new --> review
     
  • Anonymous

    Anonymous - 2020-03-24

    Passes make, make check and a full make doc.

     
  • Anonymous

    Anonymous - 2020-03-25
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2020-03-25

    Patch on countdown for March 27th

     
  • Dan Eble

    Dan Eble - 2020-03-26
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -9,6 +9,7 @@
     3. fixcc.py everything (astyle version 3.1)
     4. git diff | wc -l
    
    +```
     BASELINE                                          LINES
     master@786c3669ff08804465a89013d349fc745fd783c9   19702
    
    @@ -31,5 +32,6 @@
     ColumnLimit: 80                                   19702
     SortIncludes: false                               19702
     SpaceAfterTemplateKeyword: false                  19702
    +```
    
     https://codereview.appspot.com/551640043
    
     
  • Anonymous

    Anonymous - 2020-03-28
    • Patch: countdown --> push
     
  • Anonymous

    Anonymous - 2020-03-28

    Patch counted down - please push.

     
  • Dan Eble

    Dan Eble - 2020-03-28
    commit f2b0913e93ce24fee9e15e071c42f5d1aee54240
    Author: Dan Eble <nine.fierce.ballads@gmail.com>
    Date:   Mon Mar 23 20:35:48 2020 -0400
    
        Issue 5862/2: adjust clang-format options
    
        Add a few clang-format options to reduce (slightly) the extent of
        changes that a subsequent fixcc.py makes.
    
        ...
    
    commit 0731c054e413f78e29eee89e44f4fb40ae5bb268
    Author: Dan Eble <nine.fierce.ballads@gmail.com>
    Date:   Sun Mar 22 18:03:57 2020 -0400
    
        Issue 5862/1: Change preferred version of astyle from 2.04 to 3.1
    
     
  • Dan Eble

    Dan Eble - 2020-03-28
    • labels: --> Fixed_2_21_0
    • status: Started --> Fixed
    • Patch: push -->
    • Type: Enhancement --> Scripts