Find unused code in a Rails app

后端 未结 11 1467
南方客
南方客 2020-12-01 02:35

How do I find what code is and isn\'t being run in production ?

The app is well-tested, but there\'s a lot of tests that test unused code.

11条回答
  •  伪装坚强ぢ
    2020-12-01 03:13

    Maybe you can try to use rails_best_practices to check unused methods and class.

    Here it is in the github: https://github.com/railsbp/rails_best_practices .

    Put 'gem "rails_best_practices" ' in your Gemfile and then run rails_best_practices . to generate configuration file

提交回复
热议问题