[ 
https://issues.apache.org/jira/browse/LUCY-141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marvin Humphrey updated LUCY-141:
---------------------------------

    Attachment: brackets.patch

In the previously uploaded patch file, whitespace.patch, only whitespace was
changed.  In this file, brackets.patch, the only change is that brackets are
added to our C code and some whitepace gets modified.  

While AStyle has a setting which will insert brackets, it is not a full-on C
parser and will accept plenty of invalid constructs.  I don't trust AStyle to
always do the right thing, and thus I believe it's best to limit AStyle's
sphere of influence to whitespace alone by leaving the "--add-brackets"
directive out of our astylerc file.

However, using it to perform a one-time insertion of brackets, followed up by
careful manual QC, seems acceptable.

> 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, astylerc, 
> astylerc, brackets.patch, lucytidy.pl, run_astyle.pl, whitespace.patch, 
> whitespace_stages.tgz
>
>
> 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

Reply via email to