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

Running in subdirectory returns churn of 0 #461

Open
geetfun opened this issue Jul 10, 2023 · 1 comment
Open

Running in subdirectory returns churn of 0 #461

geetfun opened this issue Jul 10, 2023 · 1 comment

Comments

@geetfun
Copy link

geetfun commented Jul 10, 2023

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.

rishijain added a commit to rishijain/rubycritic that referenced this issue Oct 11, 2023
rishijain added a commit to rishijain/rubycritic that referenced this issue Oct 11, 2023
rishijain added a commit to rishijain/rubycritic that referenced this issue Oct 11, 2023
* bug fix
* reek fixes
* updated changelog
rishijain added a commit to rishijain/rubycritic that referenced this issue Oct 18, 2023
* bug fix
* reek fixes
* updated changelog
etagwerker pushed a commit that referenced this issue Oct 18, 2023
@rishijain
Copy link
Contributor

@etagwerker Can we close this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants