Showing 229 of 406 total issues
Function render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render: function(data, partials, labels)
{
if (jasy.Env.isSet("debug"))
{
if (!(core.Main.isTypeOf(data, "Object") || core.Main.isTypeOf(data, "Array"))) {
Function toISOString
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
toISOString : function()
{
var self = this;
var result, length, value, year, month;
if (!isFinite(self)) {
Function __startDeceleration
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
__startDeceleration: function(timeStamp) {
var self = this;
if (self.options.paging) {
Function createDelayed
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var createDelayed = function(nativeMethod)
{
return function(callback, context, delay)
{
if (jasy.Env.isSet("debug"))
Function debounce
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
debounce : function(func, threshold, execAsap)
{
if (jasy.Env.isSet("debug"))
{
core.Assert.isType(func, "Function");
Function run
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
run : function()
{
// Asynchronous test with timeout
var timeout = this.__timeout;
if (timeout != null)
Function query
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
query : function(expression)
{
var splits = expression.split("/");
var current = this;
- 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
Function Queue
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
scheduling_queue = (function Queue() {
var first, last, item;
function Item(fn,self) {
this.fn = fn;
Function fadeIn
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fadeIn : function(elem, from, to, callback, context)
{
// Already running
if (elem.fading == "in") {
return;
Function addField
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addField : function(field)
{
// possible variants
// 1: name, 1, test, [val1, val2]
// 2: name, 2, value
Function promise
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var promise = new core.event.Promise(function(resolve, reject) {
var result = [];
var prom;
Function notifyIsolated
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function notifyIsolated(self,cb,chain) {
var ret, _then;
try {
if (cb === false) {
chain.reject(self.msg);
Function __onHistoryChange
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
__onHistoryChange : function(e)
{
var path = core.util.HashPath.obtain(e.getData());
if (path.length == 0)
{
Function run
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
run : function(allDoneCallback, testStartedCallback, testFinishedCallback, randomize)
{
var queue = this.__tests;
var length = queue.length;
Function __autoCast
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
__autoCast : function(itemOrProperties)
{
var item;
if (core.Main.isTypeOf(itemOrProperties, "Plain"))
Consider simplifying this complex logical expression. Open
Open
if (typeof name === 'string')
{
// Find real name, apply if supported
supported = name in helperStyle && name || nameCache[name] || getProperty(name);
if (supported) {
Function test
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
def test(target="source", tool="phantom", browsers=None, main="test.Main", kernel="test.Kernel"):
"""
Automatically executes tests in either PhantomJS, NodeJS or via Testem CI
"""
- 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
Function serialize
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
var serialize = function (property, object, callback, properties, whitespace, indentation, stack)
Function ii
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
var ii = function(a, b, c, d, x, s, t) {
Function gg
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
var gg = function(a, b, c, d, x, s, t) {