benjamine/fiberglass

View on GitHub

Showing 12 of 16 total issues

Function bundle has 94 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function bundle(gulp, plugins, options) {
  var packageInfo = options.packageInfo;
  var name = options.name || packageInfo.name;
  var taskName = 'bundle-' + name;
  var src = options.src || './src/main.js';
Severity: Major
Found in src/gulp/tasks/util/bundler.js - About 3 hrs to fix

    Function bundle has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
    Open

    function bundle(gulp, plugins, options) {
      var packageInfo = options.packageInfo;
      var name = options.name || packageInfo.name;
      var taskName = 'bundle-' + name;
      var src = options.src || './src/main.js';
    Severity: Minor
    Found in src/gulp/tasks/util/bundler.js - About 3 hrs 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 auto has 83 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function auto(loader) {
      var gulp = loader.gulp;
      var plugins = loader.plugins;
      var packageInfo = loader.packageInfo();
      var loaderOptions = loader.options;
    Severity: Major
    Found in src/gulp/tasks/util/bundler.js - About 3 hrs to fix

      Function bundleTask has 75 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function bundleTask(callback) {
      
          var browserifyOptions = options.browserifyOptions || {};
          browserifyOptions.debug = true;
      
      
      Severity: Major
      Found in src/gulp/tasks/util/bundler.js - About 3 hrs to fix

        Function publish has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
        Open

        function publish(projectRoot){
        
          var packageInfo = require(path.join(projectRoot, 'package.json'));
          cd(projectRoot);
          var branchIsNew = false;
        Severity: Minor
        Found in src/gh-pages/publisher.js - About 2 hrs 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

        File bundler.js has 265 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        
        var path = require('path');
        var fs = require('fs');
        var _ = require('underscore.string');
        var browserify = require('browserify');
        Severity: Minor
        Found in src/gulp/tasks/util/bundler.js - About 2 hrs to fix

          Function register has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          exports.register = function(gulp, loader){
          
            var projectRoot = loader.projectRoot;
            require('shelljs/global');
            /*global config, exec, cd */
          Severity: Major
          Found in src/gulp/tasks/bump.js - About 2 hrs to fix

            Function bundlify has 57 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function bundlify(min) {
                  if (watchBundles) {
                    browserifyOptions.cache = {};
                    browserifyOptions.packageCache = {};
                    browserifyOptions.fullPaths = true;
            Severity: Major
            Found in src/gulp/tasks/util/bundler.js - About 2 hrs to fix

              Function publish has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function publish(projectRoot){
              
                var packageInfo = require(path.join(projectRoot, 'package.json'));
                cd(projectRoot);
                var branchIsNew = false;
              Severity: Minor
              Found in src/gh-pages/publisher.js - About 2 hrs to fix

                Function get has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                Open

                GulpTaskLoader.prototype.get = function() {
                  var args = Array.prototype.slice.apply(arguments).filter(function(arg){
                    return typeof arg === 'string' && arg.length > 0;
                  });
                  var self = this;
                Severity: Minor
                Found in src/gulp/loader.js - About 1 hr 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 get has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                GulpTaskLoader.prototype.get = function() {
                  var args = Array.prototype.slice.apply(arguments).filter(function(arg){
                    return typeof arg === 'string' && arg.length > 0;
                  });
                  var self = this;
                Severity: Minor
                Found in src/gulp/loader.js - About 1 hr to fix

                  Function GulpTaskLoader has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function GulpTaskLoader(gulp, projectRoot){
                    this.projectRoot = projectRoot;
                    this.gulp = gulp;
                    this.options = {};
                    this.plugins = require('gulp-load-plugins')({
                  Severity: Minor
                  Found in src/gulp/loader.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language