mohayonao/SCScript

View on GitHub

Showing 245 of 1,712 total issues

File SimpleNumber.js has 665 lines of code (exceeds 250 allowed). Consider refactoring.
Open

SCScript.install(function(sc) {
  "use strict";

  require("./Number");

Severity: Major
Found in src/sc/classlib/Math/SimpleNumber.js - About 1 day to fix

    File AbstractFunction.js has 619 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

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

      File Integer_test.js has 611 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

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

        File Stream_test.js has 600 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

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

          File Array.js has 599 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          SCScript.install(function(sc) {
            "use strict";
          
            require("./ArrayedCollection");
          
          
          Severity: Major
          Found in src/sc/classlib/Collections/Array.js - About 1 day to fix

            File iterator_test.js has 591 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            describe("sc.lang.iterator", function() {
              "use strict";
            
              var $$ = sc.test.object;
              var $  = sc.lang.$;
            Severity: Major
            Found in src/sc/lang/iterator_test.js - About 1 day to fix

              File Dictionary_test.js has 587 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

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

                File function-expr_test.js has 584 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/function-expr_test.js - About 1 day to fix

                  File Dictionary.js has 528 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  SCScript.install(function(sc) {
                    "use strict";
                  
                    require("./Association");
                    require("./Set");
                  Severity: Major
                  Found in src/sc/classlib/Collections/Dictionary.js - About 1 day to fix

                    Function onload has 214 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    window.onload = function() {
                      "use strict";
                    
                      var editor, now;
                      var prev = "";
                    Severity: Major
                    Found in demo/index.js - About 1 day to fix

                      Function onload has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                      Open

                      window.onload = function() {
                        "use strict";
                      
                        var editor, now;
                        var prev = "";
                      Severity: Minor
                      Found in demo/index.js - About 1 day 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 Patterns_test.js has 497 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      describe("Streams/Patterns", function() {
                        "use strict";
                      
                        var $$ = sc.test.object;
                        var $  = sc.lang.$;
                      Severity: Minor
                      Found in src/sc/classlib/Streams/Patterns_test.js - About 7 hrs to fix

                        Function amdefine has 186 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function amdefine(module, requireFn) {
                              'use strict';
                              var defineCache = {}, loaderCache = {}, alreadyCalled = false, path = require('path', module), makeRequire, stringRequire;
                              function trimDots(ary) {
                                var i, part;
                        Severity: Major
                        Found in assets/escodegen.js - About 7 hrs to fix

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

                          describe("sc.lang.compiler.CodeGen", function() {
                            "use strict";
                          
                            var Syntax = sc.lang.compiler.Syntax;
                            var Token = sc.lang.compiler.Token;
                          Severity: Minor
                          Found in src/sc/lang/compiler/codegen/function-expr_test.js - About 6 hrs to fix

                            File Symbol_test.js has 439 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            describe("Core/Symbol", function() {
                              "use strict";
                            
                              var testCase = sc.test.testCase;
                              var $$ = sc.test.object;
                            Severity: Minor
                            Found in src/sc/classlib/Core/Symbol_test.js - About 6 hrs to fix

                              File String_test.js has 412 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              describe("Collections/String", function() {
                                "use strict";
                              
                                var testCase = sc.test.testCase;
                                var $$ = sc.test.object;
                              Severity: Minor
                              Found in src/sc/classlib/Collections/String_test.js - About 5 hrs to fix

                                File test-utils.js has 411 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                /* globals _: true, it: true, expect: true, esprima: true, escodegen: true */
                                (function(sc) {
                                  "use strict";
                                
                                  require("../src/sc/");
                                Severity: Minor
                                Found in tools/test-utils.js - About 5 hrs to fix

                                  File Nil_test.js has 409 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  describe("Core/Nil", function() {
                                    "use strict";
                                  
                                    var $$ = sc.test.object;
                                    var $  = sc.lang.$;
                                  Severity: Minor
                                  Found in src/sc/classlib/Core/Nil_test.js - About 5 hrs to fix

                                    File Stream.js has 408 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    SCScript.install(function(sc) {
                                      "use strict";
                                    
                                      require("../Core/AbstractFunction");
                                    
                                    
                                    Severity: Minor
                                    Found in src/sc/classlib/Streams/Stream.js - About 5 hrs to fix

                                      Function scanPunctuator has 142 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          function scanPunctuator() {
                                              var start = index,
                                                  code = source.charCodeAt(index),
                                                  code2,
                                                  ch1 = source[index],
                                      Severity: Major
                                      Found in assets/esprima.js - About 5 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language