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

Unhandled NaN in plugin.rb at line 100 #53

Open
PiotrPawlus opened this issue Mar 15, 2022 · 0 comments
Open

Unhandled NaN in plugin.rb at line 100 #53

PiotrPawlus opened this issue Mar 15, 2022 · 0 comments

Comments

@PiotrPawlus
Copy link

Unhandled NaN for floor at line 100 in plugin.rb

    # It returns a specific class code coverage and an emoji status as well
    def report_class(jacoco_class)
      report_result = {
        covered: 'No coverage data found : -',
        status: ':black_joker:',
        required_coverage_percentage: 'No coverage data found : -'
      }

      counter = coverage_counter(jacoco_class)
      unless counter.nil?
        coverage = (counter.covered.fdiv(counter.covered + counter.missed) * 100).floor

Output

/vendor/ruby/2.7.0/gems/danger-jacoco-0.1.8/lib/jacoco/plugin.rb:100:in `floor': \e[31m (Danger::DSLError)
[!] Invalid `Dangerfile` file: NaN\e[0m
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