Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify old/legacy code and clean it up #10545

Open
jywarren opened this issue Nov 30, 2021 · 3 comments
Open

Identify old/legacy code and clean it up #10545

jywarren opened this issue Nov 30, 2021 · 3 comments
Labels
brainstorm Issues that need discussion and requirements need to be elucidated break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration deprecation enhancement explains that the issue is to improve upon one of our existing features planning Planning issues! refactorization

Comments

@jywarren
Copy link
Member

This is a big long-term project, related to #956, and I found a bunch of tools we can use to find old unused code:

https://github.com/evilmartians/terraforming-rails

https://test-prof.evilmartians.io/

https://github.com/amatsuda/traceroute

Let's discuss and this is something we can try periodically!

@jywarren jywarren added enhancement explains that the issue is to improve upon one of our existing features break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration planning Planning issues! refactorization brainstorm Issues that need discussion and requirements need to be elucidated deprecation labels Nov 30, 2021
@anirudhprabhakaran3
Copy link
Member

Hello, @jywarren !

I installed traceroute and ran it, and I got this output.

Unused routes (39):
  /spec/javascripts/fixtures
  /sidekiq
  rusers#index
  rusers#create
  rusers#new
  rusers#edit
  rusers#show
  rusers#update
  rusers#update
  rusers#destroy
  user_sessions#edit
  user_sessions#show
  user_sessions#update
  user_sessions#update
  images#index
  images#edit
  images#show
  images#update
  images#update
  images#destroy
  features#show
  features#destroy
  users#index
  openid#wsdl
  subscription#following
  csvfiles#new
  place#feed
  legacy#image
  subscription#notes
  tag#add_tag
  tag#remove_tag
  tag#remove_all_tags
  home#nearby
  users#settings
  users#map
  stats#maps
  stats#maps
  editor#choose
  editor#tempfunc

Unreachable action methods (19):
  comment#get_react_comments
  comment#create_comment
  home#blog
  images#delete
  map#new
  map#create
  openid#show_decision_page
  openid#url_for_user
  stats#all_time_stats
  stats#export_as_json
  subscription#tag_count
  subscription#followed
  user_sessions#handle_site_login_flow
  user_sessions#handle_social_login_flow
  user_tags#suggested
  users#followed
  wiki#subdomain
  wiki#update_node_attributes
  wiki#update_tags

I think we can go and see what these particular routes and controller actions do. If we need them, we can bring them back, or deprecate them slowly.

@jywarren
Copy link
Member Author

jywarren commented Feb 1, 2022

Oh wow that's a big list! Thank you!!!

@iem-saad
Copy link
Contributor

Hi @jywarren I am up for this task. If you are free please help me breakdown this task into smaller tasks and then start working.
I love working for Publiclab.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brainstorm Issues that need discussion and requirements need to be elucidated break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration deprecation enhancement explains that the issue is to improve upon one of our existing features planning Planning issues! refactorization
Projects
None yet
Development

No branches or pull requests

3 participants