Re: Script to format the functions in a C header?

You could use clang-format and an appropriately configured
.clang-format file to enforce coding convention within a source

I'd recommend checking: as a simple way
to build your .clang-format

I tend to keep an "" script in my repos to ensure
everything stays sane during development:

clang-format -i $(find . -name '*.[ch]')

# Check we have no typos.
which misspell 2>/dev/null >/dev/null
if [[ $? -eq 0 ]]; then
    misspell -error $(find . -name '*.[ch]')

Note that misspell is a golang package, and makes sure I have
no embarrassing typos in my code :) "diffrent" happens so often..

- ikey

On 20/11/16 10:19, Sébastien Wilmet wrote:

Is there a script to format the function prototypes in a C header, with
the GNOME conventions? I.e. aligning the function names on the same
column, aligning the parameters, etc.

desktop-devel-list mailing list
desktop-devel-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]