lucy-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marvin Humphrey (JIRA)" <>
Subject [lucy-issues] [jira] [Commented] (LUCY-141) Auto-format C code using astyle
Date Mon, 11 Apr 2011 04:23:06 GMT


Marvin Humphrey commented on LUCY-141:

Here's a recipe for applying the series of patches locally using git-svn.  I'm
a git n00b; I'm sure there's a better way to do this, but it'll work.

git svn clone -s -r 1090693 lucystyle
cd lucystyle
cp /path/to/patches/*.patch .
cp /path/to/astylerc devel/conf/
patch -p1 < 0003-Remove-trailing-whitespace-from-C-code.patch
git commit -a
patch -p1 < 0004-Adapt-preprocessor-macros-for-pre-ANSI-style.patch
git commit -a
patch -p1 < 0005-Attach-opening-brackets-for-functions-to-end-of-the-.patch
git commit -a
patch -p1 < 0006-Break-function-body-opening-lines-when-they-exceed-7.patch
git commit -a
patch -p1 < 0007-Break-after-operator-because-astyle-does-not-indent-.patch
git commit -a
astyle --options=devel/conf/astylerc --suffix=none --recursive "core/*.c"
astyle --options=devel/conf/astylerc --suffix=none --recursive "perl/*.c"
astyle --options=devel/conf/astylerc --suffix=none --recursive "clownfish/*.c"
export GIT_PAGER="cat"
git diff

To zap changes since the last local commit, use "git reset --hard".  Try
alternating that with making changes to the astylerc.

> Auto-format C code using astyle
> -------------------------------
>                 Key: LUCY-141
>                 URL:
>             Project: Lucy
>          Issue Type: Improvement
>            Reporter: Marvin Humphrey
>            Assignee: Marvin Humphrey
>            Priority: Minor
>             Fix For: 0.1-incubating
>         Attachments: 0003-Remove-trailing-whitespace-from-C-code.patch, 0004-Adapt-preprocessor-macros-for-pre-ANSI-style.patch,
0005-Attach-opening-brackets-for-functions-to-end-of-the-.patch, 0006-Break-function-body-opening-lines-when-they-exceed-7.patch,
> We should consider using the automatic code formatter astyle for 
> our C code.
> Dev list thread:

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message