Feature #1738
provide configurable control over code formatting
0%
History
#1 Updated by Eric Faulhaber over 11 years ago
Currently, the Java anti-parser (e.g., brew.xml and related rule sets) is hard-coded to Golden Code coding standards, but customers will have their own formatting requirements. These should be configurable (means of configuration TBD). Features to consider:
- indents (number of spaces, optional hard tabs (yuck)?)
- curly brace placement (on a new line or at end of previous line?)
- maximum line length (if any)
- how to wrap long lines (e.g., whether or how to align parameters that flow from one line to the next?)
- how many blank lines between constructs
There are surely others and we may want to drop some of the above; this is just a starting point for ideas. We probably want to avoid items that will require changing the order in which the various parts of a Java class emit, as that will require changes to the rules logic, rather than just hooks to implement pre-determined parameters.
I suspect customer requirements will drive more or less effort in this area.
#2 Updated by Greg Shah over 11 years ago
- Target version set to Code Improvements
#3 Updated by Greg Shah over 7 years ago
- Target version changed from Code Improvements to Converted Code Improvements - Deduplication
#4 Updated by Greg Shah over 4 years ago
Specific customer requests:
1. Indentation: 3 space characters
2. Condensed code blocks (no new line before opening curly brace)
if (x) { } else if (y) { } else { } public class SomeClass { }