java checkstyle,禁用特定Java包的所有checkstyle检查

I have two packages namely

com/mydomain/abc/delegate/xyz/jaxws/managed

and com/mydomain/abc/xyz/jaxws/managed

I require checkstyle to be disabled only for the second package as these holds proxy classes that are autogenerated.

I use a suppression.xml as shown below

/p>

"-//Puppy Crawl//DTD Suppressions 1.1//EN"

"suppressions_1_1.dtd">

Please note the first suppression for disabling JavadocPackage check works fine but the second one does not. I am afraid that my regex for selecting the package might be wrong. Any help is much appreciated.

To state my requirements with an example:

The criteria for selection is that the package name should end in jaxws.managed but should not contain delegate in package name. More over delegate should come before jaxws.managed in the package name:

eg: checktyle checks in package com.mycomany.delegate.service.jaxws.managed must be enabled while that in com.mycompany.abc.service.jaxws.service must be disabled and it is to be noted that I do not know all the pakages names upfront except for this pattern.

Thanks and Regards

Sibi

解决方案

Just use the suppression:

Alternatively, I would recommend only passing the files you want checked to Checkstyle. For example, if you are using ANT, use a to specify the files to process, and use to specify files to ignore.

For example:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值