Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#263 max-instatement-indent < 40 causes "Invalid option" error

2.x
open-fixed
Jim Pattee
None
7
2014-04-17
2014-01-09
Stefan H. Holek
No

Contrary to the docs, which state that values below 2*indent will be ignored, the max-instatement-indent check is hard-coded to < 40.

Discussion

  • And why stop at 2 indents anyway? I can see value in setting this to 0 to get rid of all paren-aligning.

     
  • Index: AStyle/src/astyle_main.cpp
    ===================================================================
    --- AStyle/src/astyle_main.cpp  (revision 412)
    +++ AStyle/src/astyle_main.cpp  (working copy)
    @@ -2888,7 +2888,7 @@
            string maxIndentParam = getParam(arg, "M", "max-instatement-indent=");
            if (maxIndentParam.length() > 0)
                maxIndent = atoi(maxIndentParam.c_str());
    -       if (maxIndent < 40)
    +       if (maxIndent < 0)
                isOptionError(arg, errorInfo);
            else if (maxIndent > 120)
                isOptionError(arg, errorInfo);
    
     
  • Jim Pattee
    Jim Pattee
    2014-04-17

    The documentation is correct for the current release.

     
  • Jim Pattee
    Jim Pattee
    2014-04-17

    • status: open --> open-fixed
    • assigned_to: Jim Pattee
    • Priority: 5 --> 7