rubycritic icon indicating copy to clipboard operation
rubycritic copied to clipboard

Running in subdirectory returns `churn` of `0`

Open geetfun opened this issue 1 year ago • 1 comments

When running rubycritic in a subfolder, the Churn returns 0.

Example of a mono-repo where a subfolder is a Rails app, and other folders hold other components (eg. React app, docs, etc):

main-app |-rails_app |-docs |-frontend

cd rails_app
rubycritic # Returns churn of 0

Running from the root directory works.

Steps to reproduce:

  1. Git clone sample app (https://github.com/geetfun/rails-in-subdir)
  2. Run rubycritic from the root folder --> No problem
  3. Run rubycritic from the Rails directory subfolder --> Churn shows 0

From the root directory:

Screenshot 2023-07-10 at 7 35 13 PM

From the subfolder: Screenshot 2023-07-10 at 7 35 02 PM

Expectation: Both churn values should be the same regardless of where the rubycritic command is run

Side thought: This may just be a limitation of how the app calls git within a subfolder, but it's a gotcha when working with monorepos.

geetfun avatar Jul 10 '23 23:07 geetfun

@etagwerker Can we close this issue ?

rishijain avatar Oct 18 '23 15:10 rishijain