plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

Identify old/legacy code and clean it up

Open jywarren opened this issue 3 years ago • 3 comments

This is a big long-term project, related to https://github.com/publiclab/plots2/issues/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 avatar Nov 30 '21 18:11 jywarren

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.

anirudhprabhakaran3 avatar Jan 05 '22 15:01 anirudhprabhakaran3

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

jywarren avatar Feb 01 '22 00:02 jywarren

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.

iem-saad avatar Aug 22 '22 14:08 iem-saad