Showing 406 of 406 total issues
Function load
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
load: function(uri, callback, context, nocache)
{
if (jasy.Env.isSet("debug"))
{
core.Assert.isType(uri, "String");
Function load
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
load : function(uri, callback, context, nocache)
{
if (jasy.Env.isSet("debug"))
{
core.Assert.isType(uri, "String");
Function createView
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
createView : function(name, construct, varargs)
{
this.log("Creating view: " + name);
var db = this.__views;
- 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 createIterator
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
var createIterator = function(config)
{
var code = '';
code += config.init || '';
Function preloadSection
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
preloadSection: function(section, recursive, callback, context, random)
{
if (jasy.Env.isSet("debug"))
{
core.Assert.isType(section, "String");
Function changeInheritedHelper
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
var changeInheritedHelper = function(obj, newValue, oldValue, config)
{
// TODO: Improved this lookup via $$children
if (!obj._getChildren) {
return;
Function __treeWalker
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
__treeWalker: function(node, base) {
var html = '';
var filter = function(value) {
- 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
Similar blocks of code found in 2 locations. Consider refactoring. Open
def test_node(profile):
"""Automatically executes tests using NodeJS"""
Console.info("")
Console.info("Running NodeJS based test suite...")
- Read upRead up
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 59.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
def test_phantom(profile):
"""Automatically executes tests using PhantomJS"""
Console.info("")
Console.info("Running PhantomJS based test suite...")
- Read upRead up
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 59.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function getData
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
getData : function(form)
{
if (jasy.Env.isSet("debug"))
{
core.Assert.isEqual(arguments.length, 1);
Consider simplifying this complex logical expression. Open
if (stringifySupported)
{
(function()
{
var value, undef;
Similar blocks of code found in 2 locations. Consider refactoring. Open
enable : function(approach)
{
var names = this.getAllViewNames();
for (var i=0, l=names.length; i<l; i++)
{
- Read upRead up
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 87.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
disable : function(approach)
{
var names = this.getAllViewNames();
for (var i=0, l=names.length; i<l; i++)
{
- Read upRead up
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 87.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function Promise
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Promise(executor, context) {
if (typeof executor != "function") {
throw TypeError("Not a function");
}
Function __stepThroughDeceleration
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
__stepThroughDeceleration: function(render) {
var self = this;
Function __bindEvents
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
__bindEvents : function()
{
var that = this;
// reflow handling
`` has 23 functions (exceeds 20 allowed). Consider refactoring. Open
{
/*
======================================================
PARENT CONNECTION
======================================================
Function __showContent
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
__showContent: function(data, doToggle) {
if (data.file) {
var content = document.getElementById('content'),
Function __runNextSuite
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
__runNextSuite : function()
{
var previousSuite = this.__suites[this.__currentIndex];
var currentSuite = this.__suites[++this.__currentIndex];
- 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 scrollX
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
scrollX : function(element, align)
{
var parent = element.parentNode;
var doc = element.ownerDocument;
var body = doc.body;