mcfly-io/generator-sublime

View on GitHub

Showing 41 of 41 total issues

File index.js has 539 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';
var path = require('path');
var generators = require('yeoman-generator');
var _ = require('lodash');
var chalk = require('chalk');
Severity: Major
Found in gulps/index.js - About 1 day to fix

    Function projectFiles has 217 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            projectFiles: function() {
                this.npmPackages = null;
                var done = this.async();
                if (this.Tasks.length <= 0) {
                    this.log(chalk.bold.yellow('You didn\'t select any gulp task'));
    Severity: Major
    Found in gulps/index.js - About 1 day to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

              it('should include proper fonts when fontawesome framework', function(done) {
                  this.runGen.withOptions({
                          'skip-install': true,
                          'ionic': false,
                          'famous': false,
      Severity: Major
      Found in test/gulps.tests.js and 1 other location - About 7 hrs to fix
      test/gulps.tests.js on lines 387..409

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 191.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

              it('should include proper fonts when bootstrap framework', function(done) {
                  this.runGen.withOptions({
                          'skip-install': true,
                          'ionic': false,
                          'famous': false,
      Severity: Major
      Found in test/gulps.tests.js and 1 other location - About 7 hrs to fix
      test/gulps.tests.js on lines 363..385

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 191.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Function constructor has 162 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          constructor: function() {
      
              generators.Base.apply(this, arguments);
              this.allTasks = [
                  'lint',
      Severity: Major
      Found in gulps/index.js - About 6 hrs to fix

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

            xit('.travis.yml with NpmPublish true does contains github info', function(done) {
        
                projectFiles.call(this, function() {
                    var body = testHelper.readTextFile('.travis.yml');
        
        
        Severity: Major
        Found in test/app.tests.js and 1 other location - About 6 hrs to fix
        test/app.tests.js on lines 152..163

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 163.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

            xit('.travis.yml with NpmPublish false does not contains github info', function(done) {
        
                projectFiles.call(this, function() {
                    var body = testHelper.readTextFile('.travis.yml');
                    assert.equal(body.indexOf('provider: npm') < 0, true);
        Severity: Major
        Found in test/app.tests.js and 1 other location - About 6 hrs to fix
        test/app.tests.js on lines 165..177

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 163.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

            it('#notifyUpdate() should not exit when version is up to date', function(done) {
                var notifierCallback = sinon.spy();
                generator.utils.shell = {
                    exit: sinon.stub()
                };
        Severity: Major
        Found in test/class.tests.js and 1 other location - About 5 hrs to fix
        test/class.tests.js on lines 130..146

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 153.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

            it('#notifyUpdate() should not exit when there is a new version', function(done) {
                var notifierCallback = sinon.spy();
                generator.utils.shell = {
                    exit: sinon.stub()
                };
        Severity: Major
        Found in test/class.tests.js and 1 other location - About 5 hrs to fix
        test/class.tests.js on lines 148..163

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 153.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

        module.exports = function() {
            var readTextFile = function(filename) {
                var body = fs.readFileSync(filename, 'utf8');
                return body;
            };
        Severity: Major
        Found in test/testHelper.js - About 4 hrs to fix

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

              it('#checkGit() when check-git is true and git is installed should do nothing', function() {
                  generator.options['check-git'] = true;
                  generator.utils.shell = {
                      which: sinon.stub().returns(true)
                  };
          Severity: Major
          Found in test/class.tests.js and 1 other location - About 3 hrs to fix
          test/class.tests.js on lines 50..60

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 100.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

              it('#checkTravis() when check-travis is true and travis is installed should do nothing', function() {
                  generator.options['check-travis'] = true;
                  generator.utils.shell = {
                      which: sinon.stub().returns(true)
                  };
          Severity: Major
          Found in test/class.tests.js and 1 other location - About 3 hrs to fix
          test/class.tests.js on lines 102..112

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 100.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Function askFor has 61 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  askFor: function() {
          
                      var done = this.async();
          
                      var choices = this.allFiles.map(function(file) {
          Severity: Major
          Found in app/index.js - About 2 hrs to fix

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

                    askFor: function() {
            
                        var done = this.async();
                        var that = this;
                        var choices = this.allTasks.map(function(task) {
            Severity: Major
            Found in gulps/index.js - About 2 hrs to fix

              File gulps.tests.js has 262 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              'use strict';
              
              var path = require('path');
              var helpers = require('yeoman-generator').test;
              var testHelper = require('./testHelper')();
              Severity: Minor
              Found in test/gulps.tests.js - About 2 hrs to fix

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    it('with Gitconfig answser true should create git-config.sh and validate-commit-msg.js file', function(done) {
                
                        this.runGen.withPrompts({
                            'Gitconfig': true
                        }).on('end', function() {
                Severity: Major
                Found in test/app.tests.js and 1 other location - About 2 hrs to fix
                test/app.tests.js on lines 279..288

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 76.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    it('with Gitconfig answser false should not create git-config.sh and validate-commit-msg.js file', function(done) {
                
                        this.runGen.withPrompts({
                            'Gitconfig': false
                        }).on('end', function() {
                Severity: Major
                Found in test/app.tests.js and 1 other location - About 2 hrs to fix
                test/app.tests.js on lines 268..277

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 76.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                            this.runGen = helpers.run(path.join(__dirname, generator))
                                .inDir(path.join(os.tmpdir(), testHelper.tempFolder))
                                .withOptions(defaultOptions);
                Severity: Major
                Found in test/gulps.tests.js and 1 other location - About 1 hr to fix
                test/app.tests.js on lines 78..80

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 64.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    it('#checkTravis() when check-travis is false should do nothing', function() {
                        generator.options['check-travis'] = false;
                        return generator
                            .checkTravis()
                            .then(function(value) {
                Severity: Major
                Found in test/class.tests.js and 1 other location - About 1 hr to fix
                test/class.tests.js on lines 93..100

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 64.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                        this.runGen = helpers.run(path.join(__dirname, generator))
                            .inDir(path.join(os.tmpdir(), testHelper.tempFolder))
                            .withOptions(defaultOptions);
                Severity: Major
                Found in test/app.tests.js and 1 other location - About 1 hr to fix
                test/gulps.tests.js on lines 40..42

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 64.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Severity
                Category
                Status
                Source
                Language