mohayonao/SCScript

View on GitHub

Showing 1,712 of 1,712 total issues

File escodegen.js has 4097 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// Generated by CommonJS Everywhere 0.9.7
(function (global) {
  function require(file, parentModule) {
    if ({}.hasOwnProperty.call(require.cache, file))
      return require.cache[file];
Severity: Major
Found in assets/escodegen.js - About 1 wk to fix

    File esprima.js has 2993 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
      Copyright (C) 2013 Ariya Hidayat <ariya.hidayat@gmail.com>
      Copyright (C) 2013 Thaddee Tyl <thaddee.tyl@gmail.com>
      Copyright (C) 2013 Mathias Bynens <mathias@qiwi.be>
      Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
    Severity: Major
    Found in assets/esprima.js - About 1 wk to fix

      File compiler_test.js has 2057 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      describe("sc.lang.compiler", function() {
        "use strict";
      
        var Syntax = sc.lang.compiler.Syntax;
        var Token = sc.lang.compiler.Token;
      Severity: Major
      Found in src/sc/lang/compiler/compiler_test.js - About 5 days to fix

        File SequenceableCollection_test.js has 1631 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        describe("Collections/SequenceableCollection", function() {
          "use strict";
        
          var testCase = sc.test.testCase;
          var $$ = sc.test.object;
        Severity: Major
        Found in src/sc/classlib/Collections/SequenceableCollection_test.js - About 4 days to fix

          File SequenceableCollection.js has 1572 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          SCScript.install(function(sc) {
            "use strict";
          
            require("./Collection");
          
          
          Severity: Major
          Found in src/sc/classlib/Collections/SequenceableCollection.js - About 4 days to fix

            File call-expr_test.js has 1478 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            describe("sc.lang.compiler.Parser", function() {
              "use strict";
            
              var Syntax = sc.lang.compiler.Syntax;
              var Token = sc.lang.compiler.Token;
            Severity: Major
            Found in src/sc/lang/compiler/parser/call-expr_test.js - About 3 days to fix

              File Object_test.js has 1469 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              describe("Core/Object", function() {
                "use strict";
              
                var testCase = sc.test.testCase;
                var $$ = sc.test.object;
              Severity: Major
              Found in src/sc/classlib/Core/Object_test.js - About 3 days to fix

                File ArrayedCollection_test.js has 1334 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                describe("Collections/ArrayedCollection", function() {
                  "use strict";
                
                  var testCase = sc.test.testCase;
                  var $$ = sc.test.object;
                Severity: Major
                Found in src/sc/classlib/Collections/ArrayedCollection_test.js - About 3 days to fix

                  File Collection_test.js has 1093 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  describe("Collections/Collection", function() {
                    "use strict";
                  
                    var testCase = sc.test.testCase;
                    var $$ = sc.test.object;
                  Severity: Major
                  Found in src/sc/classlib/Collections/Collection_test.js - About 2 days to fix

                    Function generateExpression has 550 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          function generateExpression(expr, option) {
                            var result, precedence, type, currentPrecedence, i, len, fragment, multiline, leftCharCode, leftSource, rightCharCode, allowIn, allowCall, allowUnparenthesizedNew, property, isGenerator;
                            precedence = option.precedence;
                            allowIn = option.allowIn;
                            allowCall = option.allowCall;
                    Severity: Major
                    Found in assets/escodegen.js - About 2 days to fix

                      File SimpleNumber_test.js has 1037 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      describe("Math/SimpleNumber", function() {
                        "use strict";
                      
                        var testCase = sc.test.testCase;
                        var $$ = sc.test.object;
                      Severity: Major
                      Found in src/sc/classlib/Math/SimpleNumber_test.js - About 2 days to fix

                        Function generateStatement has 497 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              function generateStatement(stmt, option) {
                                var i, len, result, node, specifier, allowIn, functionBody, directiveContext, fragment, semicolon, isGenerator;
                                allowIn = true;
                                semicolon = ';';
                                functionBody = false;
                        Severity: Major
                        Found in assets/escodegen.js - About 2 days to fix

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

                            sc.lang.klass.define("Pseries : Pattern", function(builder, _) {
                              var $nil = $.nil;
                          
                              builder.addProperty("<>", "start");
                              builder.addProperty("<>", "step");
                          Severity: Major
                          Found in src/sc/classlib/Streams/Patterns.js and 1 other location - About 2 days to fix
                          src/sc/classlib/Streams/Patterns.js on lines 226..283

                          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 397.

                          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

                            sc.lang.klass.define("Pgeom : Pattern", function(builder, _) {
                              var $nil = $.nil;
                          
                              builder.addProperty("<>", "start");
                              builder.addProperty("<>", "grow");
                          Severity: Major
                          Found in src/sc/classlib/Streams/Patterns.js and 1 other location - About 2 days to fix
                          src/sc/classlib/Streams/Patterns.js on lines 167..224

                          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 397.

                          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

                          File Collection.js has 895 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          SCScript.install(function(sc) {
                            "use strict";
                          
                            require("../Core/Object");
                          
                          
                          Severity: Major
                          Found in src/sc/classlib/Collections/Collection.js - About 2 days to fix

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

                                it("float$do", function() {
                                  var iter = sc.lang.iterator.float$do($$(5.5));
                            
                                  testTwice(iter, function(iter) {
                                    expect(iter.hasNext, 1).to.be.true;
                            Severity: Major
                            Found in src/sc/lang/iterator_test.js and 1 other location - About 2 days to fix
                            src/sc/lang/iterator_test.js on lines 445..458

                            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 379.

                            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("float$reverseDo", function() {
                                  var iter = sc.lang.iterator.float$reverseDo($$(5.0));
                            
                                  testTwice(iter, function(iter) {
                                    expect(iter.hasNext, 1).to.be.true;
                            Severity: Major
                            Found in src/sc/lang/iterator_test.js and 1 other location - About 2 days to fix
                            src/sc/lang/iterator_test.js on lines 405..418

                            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 379.

                            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

                            File AbstractFunction_test.js has 830 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            describe("Core/AbstractFunction", function() {
                              "use strict";
                            
                              var testCase = sc.test.testCase;
                              var $$ = sc.test.object;
                            Severity: Major
                            Found in src/sc/classlib/Core/AbstractFunction_test.js - About 1 day to fix

                              File Array_test.js has 816 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              describe("Collections/Array", function() {
                                "use strict";
                              
                                var testCase = sc.test.testCase;
                                var $$ = sc.test.object;
                              Severity: Major
                              Found in src/sc/classlib/Collections/Array_test.js - About 1 day to fix

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

                                    it("integer$for downto", function() {
                                      var iter = sc.lang.iterator.integer$for($$(5), $$(1));
                                
                                      testTwice(iter, function(iter) {
                                        expect(iter.hasNext, 1).to.be.true;
                                Severity: Major
                                Found in src/sc/lang/iterator_test.js and 5 other locations - About 1 day to fix
                                src/sc/lang/iterator_test.js on lines 136..149
                                src/sc/lang/iterator_test.js on lines 151..164
                                src/sc/lang/iterator_test.js on lines 295..308
                                src/sc/lang/iterator_test.js on lines 469..482
                                src/sc/lang/iterator_test.js on lines 484..497

                                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 344.

                                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