#360 Build in Properties not expanded in default-attribute


The auto expansion of built-in properties (http://eclipse-cs.sourceforge.net/advanced_properties.html) does work only in the value attribute but not in the default attribute.
Supporting both would help for example to configure different property settings for local IDE development and build server.

For example:
This setting does not work:
<module name="SuppressionFilter">
<property name="file" value="suppressions.xml" default="${samedir}/supressions.xml"/>

This setting does:
<module name="SuppressionFilter">
<property name="file" value="${samedir}/suppressions.xml"/>


  • Lars Koedderitzsch

    Actually this seems to be a limitation/feature of the Checkstyle core itself.

    I dug into where the property expansion is taking place in Checkstyle and the source comment said this about the default value:

     * @param aDefaultValue default to use if one of the properties in aValue
     *              cannot be resolved from aProps.

    So it seems that it is by design that property expansion only works in the value attribute and the default only kicking in when the property itself (not the file behind the path!) is not resolved.

    Please file a feature request over at the Checkstyle project if you're feeling strong about this.
    Otherwise there are several articles around at the interweb, which describe how a uniform Maven/Sonar/eclipse-cs setup can work.

  • Lars Koedderitzsch

    • status: open --> wont-fix
    • assigned_to: Lars Koedderitzsch

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks