lib/jacoco/plugin.rb
def report_class(jacoco_class)
      counter = coverage_counter(jacoco_class)
      coverage = (counter.covered.fdiv(counter.covered + counter.missed) * 100).floor
      required_coverage = minimum_class_coverage_map[jacoco_class.name]
      required_coverage = minimum_class_coverage_percentage if required_coverage.nil?
      status = coverage_status(coverage, required_coverage)

      {
        covered: coverage,
        status: status,
        required_coverage_percentage: required_coverage
      }
    end
def report_class(jacoco_class)
      counter = coverage_counter(jacoco_class)
      coverage = (counter.covered.fdiv(counter.covered + counter.missed) * 100).floor
      required_coverage = minimum_class_coverage_map[jacoco_class.name]
      required_coverage = minimum_class_coverage_percentage if required_coverage.nil?
      status = coverage_status(coverage, required_coverage)

      {
        covered: coverage,
        status: status,
        required_coverage_percentage: required_coverage
      }
    end
def report_class ( jacoco_class ) counter = coverage_counter ( jacoco_class ) coverage = ( counter . covered . fdiv ( counter . covered + counter . missed ) * 100 ) . floor required_coverage = minimum_class_coverage_map [ jacoco_class . name ] required_coverage = minimum_class_coverage_percentage if required_coverage . nil? status = coverage_status ( coverage , required_coverage ) { covered : coverage , status : status , required_coverage_percentage : required_coverage } end
It returns a specific class code coverage and an emoji status as well
It returns a specific class code coverage and an emoji status as well