MintcoinCommunity / Mintcoin-Desktop-Wallet

Wallet for MintCoin, a community proof-of-stake crypto-currency, running on Linux, Windows, or macOS
MIT License
46 stars 45 forks source link

Find and remove unused methods #50

Open shane-kerr opened 6 years ago

shane-kerr commented 6 years ago

In https://github.com/MintcoinCommunity/Mintcoin-Desktop-Wallet/pull/49 we removed an unused method which was breaking the build. Surely there are are other unused methods in the code. We should find them and remove them.

The hard way to do this is:

  1. Add private for all methods of every class
  2. Build the code, and remove private for every method until it builds
  3. Comment out every private method
  4. Build the code, and un-comment every private method actually used until it builds
  5. Delete the remaining commented-out private methods

An easier way would be to find a static analysis tool to do this. Maybe:

https://github.com/caolanm/callcatcher

There may be other options.