ebednarz/browserifix

View on GitHub

Showing 6 of 6 total issues

Function initialize has 86 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function initialize(value, key, deferred, config) {
    var fileName = getFileName(key, config.source);
    var lintifyOptions = getLintifyOptions(key, true);
    var action = 'created';
    var bundle;
Severity: Major
Found in library/initialize.js - About 3 hrs to fix

    Function jsxmas has 76 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function jsxmas(options) {
        var appBundleQueue = [];
        var vendorBundleQueue = [];
        var all;
        var config;
    Severity: Major
    Found in index.js - About 3 hrs to fix

      Function getQueue has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function getQueue(fileName, input, config) {
          var codeFileName = minifiedFileName(fileName, config.min);
          var queue = [];
          var mapFileName;
          var output;
      Severity: Minor
      Found in library/uglify.js - About 1 hr to fix

        Function getLintifyOptions has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function getLintifyOptions(key, global) {
            var options;
        
            function head(file) {
                log(['errored', [file, 'cyan']]);
        Severity: Minor
        Found in library/get-lintify-options.js - About 1 hr to fix

          Function initialize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

          function initialize(value, key, deferred, config) {
              var fileName = getFileName(key, config.source);
              var lintifyOptions = getLintifyOptions(key, true);
              var action = 'created';
              var bundle;
          Severity: Minor
          Found in library/initialize.js - About 35 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function mergeConfig has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

          function mergeConfig(options) {
              var config = JSON.parse(JSON.stringify(defaults));
              var moduleConfig = reverseConfig.get(packageName);
          
              function setConfig(key) {
          Severity: Minor
          Found in library/merge-config.js - About 35 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Severity
          Category
          Status
          Source
          Language