bugGNU indent - Bugs: bug #48972, Make -T support extended regexes.

 
 

bug #48972: Make -T support extended regexes.

Submitter:  Donovan Baarda <dbaarda>
Submitted:  Fri 02 Sep 2016 01:13:01 AM UTC
   
 
Category:  C Severity:  3 - Normal
Item Group:  Wishlist Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 02 Sep 2016 01:15:30 AM UTC, comment #1: 

Note I've added support for this and other issues in my tidyc wrapper using sed pre/post processing available at;

https://github.com/dbaarda/tidyc

Donovan Baarda <dbaarda>
Fri 02 Sep 2016 01:13:01 AM UTC, original submission:  

Currently indent requires that all user defined types be specified with -T options for code using them to be formatted correctly with options like --space-after-cast and to not put a space between '*' or '&' and the variable name in variable declarations.

Unfortunately it's not very practical to have a continuously growing list of user defined types for an evolving project just for indent reformatting.

However, most project use naming conventions for user defined types that can be matched with regular expressions. A common example is '\w+_t'. It would be nice if -T supported extended regular expressions, indicating them by bracketing the variable name in '/' delimiters like '-T /<regex>/'.

Example;


$ indent -T '/\w+_t/' foo.c


Donovan Baarda <dbaarda>

 

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

Attach Files:
   
   
Comment:
   

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 dbaarda (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code