You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gayan Weerakutti <re...@live.com> on 2017/05/09 15:39:54 UTC
How to use global checkstyle.xml that have SuppressionsFilter
included
So here in my case I want use remote checkstyle file located in https://github.com/openmrs/openmrs-core/blob/master/checkstyle.xml?#L45 in another project.
In my project's pom I have config location set as follows:<https://github.com/openmrs/openmrs-core/blob/master/checkstyle.xml?#L45>
<configLocation>
https://github.com/openmrs/openmrs-core/blob/master/checkstyle.xml
</configLocation>
However checkstyle can't resolve checkstyle-suppressions.xml because of the configuration included in the remote file:
<module name="SuppressionFilter">
<property name="file" value="checkstyle-suppressions.xml"/>
</module>
So what would be the ideal solution to be alble to use that remote checkstyle on other projects?. BTW I can get access to openmrs-core to make any necessary changes.
Thanks,
Gayan
Re: How to use global checkstyle.xml that have SuppressionsFilter
included
Posted by Martin Hoeller <ma...@xss.co.at>.
On 09 Mai 2017, Gayan Weerakutti wrote:
> So here in my case I want use remote checkstyle file located in https://github.com/openmrs/openmrs-core/blob/master/checkstyle.xml?#L45 in another project.
>
>
> In my project's pom I have config location set as follows:<https://github.com/openmrs/openmrs-core/blob/master/checkstyle.xml?#L45>
>
>
> <configLocation>
> https://github.com/openmrs/openmrs-core/blob/master/checkstyle.xml
> </configLocation>
>
> However checkstyle can't resolve checkstyle-suppressions.xml because of the configuration included in the remote file:
>
> <module name="SuppressionFilter">
> <property name="file" value="checkstyle-suppressions.xml"/>
> </module>
>
> So what would be the ideal solution to be alble to use that remote checkstyle on other projects?
What about specifying the suprresion file also in your project:
<configuration>
<configLocation>
https://github.com/openmrs/openmrs-core/blob/master/checkstyle.xml
</configLocation>
<suppressionsLocation>
https://github.com/openmrs/openmrs-core/blob/master/checkstyle-suppressions.xml
</suppressionsLocation>
</configuration>
I don't know if this works, but you could give it a try.
hth,
- martin