mbland/pages-server

View on GitHub

Showing 7 of 11 total issues

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

SiteBuilder.launchBuilder = function(hook, branch, builderConfig) {
  var builderOpts = new Options(hook, config, builderConfig),
      buildLog = builderOpts.sitePath + '.log',
      logger = new BuildLogger(buildLog),
      builder = new SiteBuilder(branch,
Severity: Minor
Found in lib/site-builder.js - About 1 hr to fix

    Function doRun has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function doRun(runner, path, args, opts, message) {
      return new Promise(function(resolve, reject) {
        var command,
            options = opts || {cwd: runner.sitePath},
            msg = message || 'rebuild failed for',
    Severity: Minor
    Found in lib/command-runner.js - About 1 hr to fix

      Function exports has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function(hook) {
        var branch = hook.ref,
            repository = hook.repository,
            commit = hook.head_commit,
            pusher = hook.pusher
      Severity: Minor
      Found in lib/webhooks/github.js - About 1 hr to fix

        Function build has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        SiteBuilder.prototype.build = function() {
          var builder = this,
              doBuild
        
          doBuild = function() {
        Severity: Minor
        Found in lib/site-builder.js - About 1 hr to fix

          Function sync has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Sync.prototype.sync = function(buildDestination) {
            var homePrefix = path.join(this.home, path.sep),
                s3Prefix = buildDestination
                  .substr(homePrefix.length)
                  .replace(/\\/g, '/'),
          Severity: Minor
          Found in lib/sync.js - About 1 hr to fix

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

            function ComponentFactory(config, builderOpts, branch, s3client, logger) {
            Severity: Minor
            Found in lib/component-factory.js - About 35 mins to fix

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

              function doRun(runner, path, args, opts, message) {
              Severity: Minor
              Found in lib/command-runner.js - About 35 mins to fix
                Severity
                Category
                Status
                Source
                Language