bugGNU indent - Bugs: bug #42357, option to keep short if statements...


bug #42357: option to keep short if statements or loops on a single line

Submitted by:  None
Submitted on:  Wed 14 May 2014 01:38:34 PM UTC  
Category:  C Severity:  3 - Normal
Item Group:  Wishlist Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Mon 17 Sep 2018 03:38:42 PM UTC, comment #1:

This has been implemented in 2.2.12 via the -slc --single-line-conditionals option.


Chris Merck <chrismerck>
Wed 14 May 2014 01:38:34 PM UTC, original submission:

That is, keep the following on a single line if feasible:

if (a) return;
while (true) continue;

Note: I don't personally like this option much (and it's very anti-1TBS, for which I just submitted a wishlist item: http://savannah.gnu.org/bugs/?42355) but I thought that for feature parity with clang-format:

search for AllowShortIfStatementsOnASingleLine and AllowShortLoopsOnASingleLine

these would be nice to include.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by chrismerck (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.4