Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C indentation tool

Tags:

c

indentation

I have a bunch of C files and I need to check for a set of indentation rules. These rules are custom made. I basically need to flag warnings for all indentation violations. Is there any code/tool that does basic parsing of a C file. I am planning to add my own stuff to a code that already exists.

like image 822
nikhil Avatar asked Nov 12 '22 02:11

nikhil


1 Answers

Since you plan on extending existing code, why not use astyle?

Once you have the correct flags it formats your code accordingly so that the results will always be the same. I (sadly) haven't found any dry-run flags, but a diff of your original file and the newly created astyle file should give you all violations.

like image 114
edt_devel Avatar answered Nov 14 '22 21:11

edt_devel