检查提示文字
Function/Method xxx is never used.
This inspection reports classes, functions or properties in the specified inspection scope that are not used or not reachable from entry points.
关闭方法
For Java:
Settings > Editor > Inspections > Search “Unused declaration” and shut down.
For Kotlin:
Settings > Editor > Inspections > Search “Unused symbol” and shut down.
参考
- java - Turn off unused code warning for public functions in IntelliJ - Stack Overflow https://stackoverflow.com/questions/23923696/turn-off-unused-code-warning-for-public-functions-in-intellij/23924251