[ https://issues.apache.org/jira/browse/LUCY-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018190#comment-13018190
]
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.
{noformat}
git svn clone -s -r 1090693 https://svn.apache.org/repos/asf/incubator/lucy/trunk 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
{noformat}
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: https://issues.apache.org/jira/browse/LUCY-141
> 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,
0007-Break-after-operator-because-astyle-does-not-indent-.patch
>
>
> We should consider using the automatic code formatter astyle for
> our C code.
> Dev list thread: http://s.apache.org/INC
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
|