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

False positives for begin lines, a constant definition, and some heredoc content #1071

Open
keithrbennett opened this issue Sep 6, 2023 · 0 comments

Comments

@keithrbennett
Copy link

keithrbennett commented Sep 6, 2023

Hi, I am using RSpec with JRuby 9.4.3.0. The code base on which it is running is as of the following commit in my open source 'rika' gem: keithrbennett/rika@fadcf6c . I have the false positive problems listed below, but I may very well be mistaken in my use of simplecov somehow -- for example, I am surprised that 'spec' files show up in the output:

image


begin Lines

I have a problem with SimpleCov flagging begin lines in begin/ensure/end sections as untested:

image


HEREDOC lines

In addition, I think these HEREDOC lines are false positives as well; I have tested that the method in the first image is called, and that the text it returns is included in the output:

image

image


Constant Definitions

Also, a constant definition seems to be flagged falsely, even though its value has been explicitly tested, both for its content and for its frozen state:

image


My Setup

My spec_helper.rb has at its top:

require 'simplecov'

SimpleCov.start

I am running RSpec using JRUBY_OPTS=--debug bundle exec rspec.

Simplecov gem versions I am using are:

gem list simplecov

*** LOCAL GEMS ***

simplecov (0.22.0)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)

Ruby description is:

jruby 9.4.3.0 (3.1.4) 2023-06-07 3086960792 OpenJDK 64-Bit Server VM 17.0.8.1+1-Ubuntu-0ubuntu122.04 on 17.0.8.1+1-Ubuntu-0ubuntu122.04 +jit [x86_64-linux]

Thanks for any help with this.

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

1 participant