karma-runner/karma

View on GitHub
lib/middleware/common.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function createServeFile has 62 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function createServeFile (fs, directory, config) {
  const cache = Object.create(null)

  return function (filepath, rangeHeader, response, transform, content, doNotCache) {
    let responseData
Severity: Major
Found in lib/middleware/common.js - About 2 hrs to fix

    Avoid too many return statements within this function.
    Open

          return 200 // All other states, ignore
    Severity: Major
    Found in lib/middleware/common.js - About 30 mins to fix

      There are no issues that match your filters.

      Category
      Status