Skip to content

Unused function detector#

Name: unused-function

Reports private and internal functions that are not used in the source code.

Example#

1
2
3
4
5
6
contract C {
    function _withdraw() private {
        (bool success, ) = msg.sender.call{value: address(this).balance}("");
        require(success, "Transfer failed.");
    }
}

Parameters#

The detector does not accept any additional parameters.