如何在我的 Gemfile 中找到未使用的宝石 [英] How to find unused gems in my Gemfile

查看:53
本文介绍了如何在我的 Gemfile 中找到未使用的宝石的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在我的 Gemfile 中找到未使用的 gem,以便我可以清理不再使用的引用.

How to find unused gems in my Gemfile, so that I can cleanup references which are no longer used.

推荐答案

我怀疑是否有一种自动方法可以在 Gemfile 中找到未使用的 gem.

I doubt if there is an automated way to find unused gems in the Gemfile.

对于随着时间的推移构建应用程序的人来说,手动识别由于某种原因或其他原因而被丢弃的 gem 应该很容易.

For someone who has built the application over time, it should be easy to manually identify gems that were discarded along the way for some reason or the other.

对于从其他人那里继承的遗留应用程序,手动识别未使用的 gem 是一项非常困难的任务.如果系统有全面的测试覆盖率,这将有助于通过反复试验删除未使用的 gem,同时确保测试在 Gemfile 中的每次更改时都能通过.

For a legacy application inherited from someone else, it is a much difficult task to manually identify unused gems. If there is comprehensive test coverage for the system, it would help in removing unused gems by trial and error, while ensuring that the tests pass at each change in the Gemfile.

这篇关于如何在我的 Gemfile 中找到未使用的宝石的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆