简体   繁体   中英

Metrics, smells: How to find longest (in lines of code) methods in my legacy product java repo?

What is the simplest way to find longest (in terms of lines of code) methods in a legacy java code base?

We use gradle and IntelliJ IDEA so ideally a plugin for one of these.

您可以尝试JArchitect ,它提供了许多开箱即用的代码气味规则,您可以使用用于创建规则的代码查询语言 CQLinq 轻松自定义规则。

I suggest that you do a bit of research/googling on "static code analysis" and you'll soon find things like pmd and findbugs .

For tracking these reports over time there's enterprise solutions like sonarqube

All of these have gradle integration

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