Skip to content

Unhandled NaN in plugin.rb at line 100  #53

@PiotrPawlus

Description

@PiotrPawlus

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions