Title: Find Unused Code · Issue #20 · jollygoodcode/jollygoodcode.github.io · GitHub
Open Graph Title: Find Unused Code · Issue #20 · jollygoodcode/jollygoodcode.github.io
X Title: Find Unused Code · Issue #20 · jollygoodcode/jollygoodcode.github.io
Description: We will use a CLI tool to find unused code automatically 🔎🔎🔎. Unused Unused is a CLI tool to find unused code, written in 100% Haskell by awesome Josh Clayton. Install Unused on macOS $ brew tap joshuaclayton/formulae $ brew install unus...
Open Graph Description: We will use a CLI tool to find unused code automatically 🔎🔎🔎. Unused Unused is a CLI tool to find unused code, written in 100% Haskell by awesome Josh Clayton. Install Unused on macOS $ brew tap jo...
X Description: We will use a CLI tool to find unused code automatically 🔎🔎🔎. Unused Unused is a CLI tool to find unused code, written in 100% Haskell by awesome Josh Clayton. Install Unused on macOS $ brew tap jo...
Opengraph URL: https://github.com/jollygoodcode/jollygoodcode.github.io/issues/20
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Find Unused Code","articleBody":"We will use a CLI tool to find unused code automatically 🔎🔎🔎. \n## Unused\n\n[Unused](https://unused.codes) is a CLI tool to find unused code, written in 100% Haskell by awesome [Josh Clayton](http://joshuaclayton.me/).\n## Install Unused on macOS\n\n```\n$ brew tap joshuaclayton/formulae\n$ brew install unused\n```\n## [Ctags](http://ctags.sourceforge.net/) for macOS\n\nInstall Ctags via homebrew instead of using system built-in older Ctags:\n\n```\n$ brew install ctags\n```\n\nIf you having problem that [your Ctags does not load homebrew-installed one](https://github.com/jollygoodcode/jollygoodcode.github.io/issues/20#issuecomment-229839112), add an alias (zsh):\n\n```\nalias ctags=\"`brew --prefix`/bin/ctags\"\n```\n## Generate index file\n\nFor Ruby files here is an example:\n\n```\n$ ctags -f .git/tags -R $(git ls-files | grep .rb)\n```\n\nA `.tags` file under `.git` folder will be generated, which contains the index of your Ruby code. [Don't forget to gitignore your tags file](https://help.github.com/articles/ignoring-files/#create-a-global-gitignore).\n## Find Unused Code\n\n```\n$ unused -s -g none\n```\n\n```\n* -s,--single-occurrence Display only single occurrences\n* -g,--group-by ARG [Allowed: directory, term, file, none] Group results\n```\n\nunused will do the hard work, find where unused code are, and report to you:\n\n```\nBulkCustomerDashboard 1, 1 app/dashboards/bulk_customer_dashboard.rb used once\nUserSerializer 1, 1 app/serializers/user_serializer.rb used once\nauthorized_repos 1, 1 lib/github_api.rb used once\ncreate_subscription_record 1, 1 app/services/repo_subscriber.rb used once\nexcluded_file? 1, 1 lib/ext/scss-lint/config.rb used once\nhas_something? 1, 1 spec/models/linter/ruby_spec.rb used once\nregister_email 1, 1 spec/models/linter/ruby_spec.rb used once\nstub_commit 1, 1 spec/services/build_runner_spec.rb used once\nstub_customer_with_discount_find_request 1, 1 spec/support/helpers/stripe_api_helper.rb used once\nstubbed_style_checker_with_config_file 1, 1 spec/services/build_runner_spec.rb used once\ntoken= 1, 1 app/models/user.rb used once\nuser_names 1, 1 spec/models/linter/ruby_spec.rb used once\nverified_request? 1, 1 app/controllers/application_controller.rb used once\n```\n\nWow, unused code found, delete them and then sent a [Pull Request](https://github.com/houndci/hound/pull/1169)!\n\nHappy Housekeeping! 🏡 \n\n_Note that Unused is meant to guide, though, not give definitive answers to what can be removed._\n_[-- Josh Clayton @joshuaclayton](https://twitter.com/joshuaclayton/status/745334893077536769)_ \n","author":{"url":"https://github.com/JuanitoFatas","@type":"Person","name":"JuanitoFatas"},"datePublished":"2016-06-30T17:07:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":19},"url":"https://github.com/20/jollygoodcode.github.io/issues/20"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:28297c69-5dd8-1cd4-6478-2601af0bbd16 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C4C4:2BEA3E:67D932:8D160E:6A5EDE2A |
| html-safe-nonce | 95585092aab1af28b5d3c61cf8cec474017e2f0af387e59e95fb09f0c2bc475a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNEM0OjJCRUEzRTo2N0Q5MzI6OEQxNjBFOjZBNUVERTJBIiwidmlzaXRvcl9pZCI6Ijg4NDY2NzEwMTQxMzY4MzE1MzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5f4c3a04672d16a7c1df32fb28582412f2c8f382d22457c1ab9e3ac752f6fa17 |
| hovercard-subject-tag | issue:163216307 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/jollygoodcode/jollygoodcode.github.io/20/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bfbc59bf6c0560b6f585547dcf31760b93ba7e57901c26efd25265afe514ef83/jollygoodcode/jollygoodcode.github.io/issues/20 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bfbc59bf6c0560b6f585547dcf31760b93ba7e57901c26efd25265afe514ef83/jollygoodcode/jollygoodcode.github.io/issues/20 |
| og:image:alt | We will use a CLI tool to find unused code automatically 🔎🔎🔎. Unused Unused is a CLI tool to find unused code, written in 100% Haskell by awesome Josh Clayton. Install Unused on macOS $ brew tap jo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JuanitoFatas |
| hostname | github.com |
| expected-hostname | github.com |
| None | 82d0004a35927bdb00c652a57f456c55aa0eda4ade1bc7956d7510fdea6e454b |
| turbo-cache-control | no-preview |
| go-import | github.com/jollygoodcode/jollygoodcode.github.io git https://github.com/jollygoodcode/jollygoodcode.github.io.git |
| octolytics-dimension-user_id | 5326832 |
| octolytics-dimension-user_login | jollygoodcode |
| octolytics-dimension-repository_id | 39484578 |
| octolytics-dimension-repository_nwo | jollygoodcode/jollygoodcode.github.io |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 39484578 |
| octolytics-dimension-repository_network_root_nwo | jollygoodcode/jollygoodcode.github.io |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d2d913dd727d2d7ac189fb4d05b10bc34ecd03ee |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width