RackHD/on-core

View on GitHub
lib/common/file-loader.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function fileLoaderFactory has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function fileLoaderFactory(assert, Promise, _, nodeFs, path) {
    var fs = Promise.promisifyAll(nodeFs);

    /**
     * FileLoad provides convenience methods around loading files from disk
Severity: Minor
Found in lib/common/file-loader.js - About 1 hr to fix

    Function getAll has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        FileLoader.prototype.getAll = function (directory, recursive) {
            var self = this;
            assert.string(directory);
    
            // List all files in the directory.
    Severity: Minor
    Found in lib/common/file-loader.js - About 1 hr to fix

      Function fileLoaderFactory has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function fileLoaderFactory(assert, Promise, _, nodeFs, path) {
      Severity: Minor
      Found in lib/common/file-loader.js - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status