Showing 245 of 1,712 total issues
File SimpleNumber.js
has 665 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
SCScript.install(function(sc) {
"use strict";
require("./Number");
File AbstractFunction.js
has 619 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
SCScript.install(function(sc) {
"use strict";
require("./Object");
File Integer_test.js
has 611 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
describe("Math/Integer", function() {
"use strict";
var testCase = sc.test.testCase;
var $$ = sc.test.object;
File Stream_test.js
has 600 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
describe("Streams/Stream", function() {
"use strict";
var $$ = sc.test.object;
var $ = sc.lang.$;
File Array.js
has 599 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
SCScript.install(function(sc) {
"use strict";
require("./ArrayedCollection");
File iterator_test.js
has 591 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
describe("sc.lang.iterator", function() {
"use strict";
var $$ = sc.test.object;
var $ = sc.lang.$;
File Dictionary_test.js
has 587 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
describe("Collections/Dictionary", function() {
"use strict";
var testCase = sc.test.testCase;
var $$ = sc.test.object;
File function-expr_test.js
has 584 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
describe("sc.lang.compiler.Parser", function() {
"use strict";
var Syntax = sc.lang.compiler.Syntax;
var Token = sc.lang.compiler.Token;
File Dictionary.js
has 528 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
SCScript.install(function(sc) {
"use strict";
require("./Association");
require("./Set");
Function onload
has 214 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
window.onload = function() {
"use strict";
var editor, now;
var prev = "";
Function onload
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
Open
window.onload = function() {
"use strict";
var editor, now;
var prev = "";
- Read upRead up
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
Open
describe("Streams/Patterns", function() {
"use strict";
var $$ = sc.test.object;
var $ = sc.lang.$;
Function amdefine
has 186 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function amdefine(module, requireFn) {
'use strict';
var defineCache = {}, loaderCache = {}, alreadyCalled = false, path = require('path', module), makeRequire, stringRequire;
function trimDots(ary) {
var i, part;
File function-expr_test.js
has 441 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
describe("sc.lang.compiler.CodeGen", function() {
"use strict";
var Syntax = sc.lang.compiler.Syntax;
var Token = sc.lang.compiler.Token;
File Symbol_test.js
has 439 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
describe("Core/Symbol", function() {
"use strict";
var testCase = sc.test.testCase;
var $$ = sc.test.object;
File String_test.js
has 412 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
describe("Collections/String", function() {
"use strict";
var testCase = sc.test.testCase;
var $$ = sc.test.object;
File test-utils.js
has 411 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* globals _: true, it: true, expect: true, esprima: true, escodegen: true */
(function(sc) {
"use strict";
require("../src/sc/");
File Nil_test.js
has 409 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
describe("Core/Nil", function() {
"use strict";
var $$ = sc.test.object;
var $ = sc.lang.$;
File Stream.js
has 408 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
SCScript.install(function(sc) {
"use strict";
require("../Core/AbstractFunction");
Function scanPunctuator
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function scanPunctuator() {
var start = index,
code = source.charCodeAt(index),
code2,
ch1 = source[index],