简体   繁体   中英

How do I configure checkstyle to flag Javadoc exception @throws comments that shouldn't be there?

During refactoring, a lot of the methods in the app I'm working on have had declared exceptions removed.

Unfortunately while refactoring, the Javadoc was often ignored and the exception Javadoc @throws comment still exists.

How can I get checkstyle to flag this up? I can't see any obvious configuration option.

在我看来,您应该使用JavadocMethod检查并将其validateThrows属性设置为true

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM