Showing 5 of 25 total issues
Method service_data
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.service_data(env = ENV) if env["TRAVIS"] { name: "travis-ci", branch: env["TRAVIS_BRANCH"],
Method service_data
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
def self.service_data(env = ENV) if env["TRAVIS"] { name: "travis-ci", branch: env["TRAVIS_BRANCH"],
- Read upRead up
Method to_payload
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def to_payload(result) totals = Hash.new(0) source_files = result.files.map do |file| totals[:total] += file.lines.count totals[:covered] += file.covered_lines.count
Method validate
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
def validate raise InvalidPayload, "A git commit sha was not found in the test report payload" unless commit_sha raise InvalidPayload, "A git commit timestamp was not found in the test report payload" unless committed_at raise InvalidPayload, "A run at timestamp was not found in the test report payload" unless run_at raise InvalidPayload, "No source files were found in the test report payload" unless source_files?
- Read upRead up
Method batch_post_results
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def batch_post_results(files) uri = URI.parse("#{host}/test_reports/batch") http = http_client(uri) boundary = SecureRandom.uuid