Hi all,

I am using Jalopy to format my projects and have defined a configuration
file called jalopy.xml and placed it in /src/main/resources/jalopy.xml.

When I format the source code, it mostly works;however, I would like to have
a newline before the catch and finally blocks.  I would also like it to
remove unnecessary braces for a single statement if, else, while, do, ... 
In addition, I want to enforce tabs are used, but it defaults back to
spaces.

[code]
<blanklines>
            <after>
                <block>1</block>
                <braceLeft>0</braceLeft>
                                <braceRight>1</braceRight>
                <class>0</class>
                <declaration>0</declaration>
                <footer>1</footer>
                <header>1</header>
                <interface>0</interface>
                <lastImport>1</lastImport>
                <method>1</method>
                <package>1</package>
            </after>
            <before>
                <block>1</block>
                <braceRight>0</braceRight>
                <caseBlock>1</caseBlock>
                <comment>
                    <javadoc>1</javadoc>
                    <multiline>1</multiline>
                    <singleline>1</singleline>
                </comment>
                <controlStatement>1</controlStatement>
                <declaration>1</declaration>
                <footer>0</footer>
                <header>0</header>
            </before>
            <keepUpTo>1</keepUpTo>
        </blanklines>
        <braces>
            <empty>
                <cuddle>true</cuddle>
                <insertStatement>false</insertStatement>
            </empty>
            <insert>
                <dowhile>false</dowhile>
                <for>false</for>
                <ifelse>false</ifelse>
                <while>false</while>
            </insert>
            <remove>
                <block>true</block>
                <dowhile>true</dowhile>
                <for>true</for>
                <ifelse>true</ifelse>
                <while>true</while>
            </remove>
            <treatDifferent>
                <methodClass>false</methodClass>
                <methodClassIfWrapped>false</methodClassIfWrapped>
            </treatDifferent>
        </braces>

        <indentation>
            <caseFromSwitch>true</caseFromSwitch>
            <continuation>
                <block>true</block>
                <operator>true</operator>
            </continuation>
            <firstColumnComments>true</firstColumnComments>
            <label>true</label>
            <policy>
                <deep>true</deep>
            </policy>
            <sizes>
                <braceCuddled>1</braceCuddled>
                <braceLeft>1</braceLeft>
                <braceRight>0</braceRight>
                <braceRightAfter>1</braceRightAfter>
                <continuation>1</continuation>
                <deep>55</deep>
                <extends>-1</extends>
                <general>2</general>
                <implements>-1</implements>
                <leading>0</leading>
                <tabs>2</tabs>
                <throws>-1</throws>
                <trailingComment>1</trailingComment>
            </sizes>
            <tabs>
                <enable>true</enable>
                <onlyLeading>false</onlyLeading>
            </tabs>
        </indentation>
[/code]


When I use the GUI, it looks like it should format properly - It doesn't
show tabs so I can't tell, and it also doesn't have any try/catch/finally
blocks in there.  The if/else braces removal looks like it is setup properly
to remove unused braces, but it puts them back in when I take them out.

Please let me know if this is possible, I'm trying to enforce code standards
so every single time code is built, it is properly formatted and thus before
it gets checked in, it adheres to standards.


Thanks,
Walter
-- 
View this message in context: 
http://www.nabble.com/Jalopy---configuration-not-sticking-tp21193829p21193829.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to