#1453 closed defect (fixed)
Consistent formatting of C++/Java code
Reported by: | Dimitar Misev | Owned by: | Dimitar Misev |
---|---|---|---|
Priority: | major | Milestone: | 9.3 |
Component: | undecided | Version: | development |
Keywords: | Cc: | Vlad Merticariu, Bang Pham Huu, Peter Baumann | |
Complexity: | Medium |
Description (last modified by )
The rasdaman C++/Java code should be consistently formatted; this can be done with astyle. Here's a good configuration for astyle that conforms to the rasdaman code style guide:
--suffix=none --convert-tabs --exclude=third_party --options=none --add-brackets --convert-tabs --close-templates --pad-oper --pad-header --unpad-paren --align-pointer=type --align-reference=type --indent-preproc-define --indent=spaces=4 --recursive # C++ --style=allman # Java #--style=java
The attached script can be used to recursively reformat all C++ and Java files in the directory from which it is executed, or a specific file.
Attachments (1)
Change History (4)
by , 8 years ago
Attachment: | format-sources.sh added |
---|
comment:1 by , 8 years ago
Description: | modified (diff) |
---|
comment:2 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 8 years ago
some companies enforce formatting by using repository hooks to do a force formatting. Some of these do not trust beautifiers and, therefore, format on output (download), rather than on upload → repo always contains what dever originally wrote, but devers get formatted code for their further work.
Dimitar already applied the patch, close ticket.