karma-runner/karma

View on GitHub
lib/reporter.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function createErrorFormatter has 58 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function createErrorFormatter (config, emitter, SourceMapConsumer) {
  const basePath = config.basePath
  const urlRoot = config.urlRoot === '/' ? '' : (config.urlRoot || '')
  let lastServedFiles = []

Severity: Major
Found in lib/reporter.js - About 2 hrs to fix

    Function createReporters has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function createReporters (names, config, emitter, injector) {
      const errorFormatter = createErrorFormatter(config, emitter, SourceMapConsumer)
      const reporters = []
    
      names.forEach((name) => {
    Severity: Minor
    Found in lib/reporter.js - About 1 hr to fix

      Function msg has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          let msg = input.replace(URL_REGEXP, function (stackTracePath, prefix, path, __, ___, line, ____, column) {
      Severity: Major
      Found in lib/reporter.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status