Intellij IDEA doesn't grey out some unused methods

后端 未结 3 736
别跟我提以往
别跟我提以往 2021-01-17 17:08

In intellij IDEA, if a method is unused, the method is shown in a gray color. But in some cases, IDEA doesn\'t grey out the method, but when I check the references of those

3条回答
  •  佛祖请我去吃肉
    2021-01-17 17:24

    Most likely it's not a bug, it's a limitation for performance reasons. Methods likely to take a long time when searching for usages are skipped.

    A workaround is to run Unused Declaration inspection explicitly in all your project via Analyze | Inspect Code or Analyze | Run Inspection by Name. That'll take some time. You can also set up TeamCity server to do it for you automatically every night.

提交回复
热议问题