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

Rubycritic Not Displaying Coverage Information in Rails Project #475

Open
mzagaja opened this issue Oct 23, 2023 · 5 comments
Open

Rubycritic Not Displaying Coverage Information in Rails Project #475

mzagaja opened this issue Oct 23, 2023 · 5 comments

Comments

@mzagaja
Copy link

mzagaja commented Oct 23, 2023

When I run rubycritic in my Rails project, I get an output that shows no code coverage despite a regular SimpleCov run in the project showing the coverage. I don't see any documentation about setting up configuration for rubycritic and simplecov, so presume this is a bug with the current version.

@JuanVqz
Copy link
Contributor

JuanVqz commented Oct 23, 2023

Hi @mzagaja! can you share reproducible steps? versions? logs? thanks!

@mzagaja
Copy link
Author

mzagaja commented Oct 23, 2023

@JuanVqz I've attached a sample rails new project as a .zip you can see. I'm using Ruby 3.1.2. Rails 7.0.8. Rubycritic is:

rubycritic -v
RubyCritic 4.9.0

test_rubycritic.zip

I think that should mostly cover everything. Let me know if you need anything else, otherwise 👀 on the /tmp/rubycritic directory if you want to see the output here. You should be able to see there is a test covering app/models/test_model.rb.

@JuanVqz
Copy link
Contributor

JuanVqz commented Oct 23, 2023

@mzagaja I'm able to reproduce it and have a workaround for it.

I had to install and run the simplecov gem, it will generate a folder called coverage at the root directory then when you run the rubycritic command it will pick those results previously generated.

I'm unsure if that is something expected, I'll debug more.
Just wanted to let you know in case you want to go with that solution in the meantime.

@mzagaja
Copy link
Author

mzagaja commented Dec 19, 2023

Thanks, I didn't realize I failed to leave a note indicating this workaround worked. Appreciate it!

@JuanVqz
Copy link
Contributor

JuanVqz commented Dec 19, 2023

@mzagaja I'm still down to debug this but haven't had the chance yet, will ping you when solved, 👍

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