Showing 229 of 406 total issues
Function testFinished
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
testFinished : function(test)
{
console.info("- " + test.getSummary());
if (!test.wasSuccessful())
Function buildTree
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildTree(tokens, stack)
{
var instructions = [];
var opener = null;
var token = null;
Function add
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
add : function(target, type, callback, context, capture)
{
// Hard-wire context to function, re-use existing bound functions
if (context) {
callback = core.Function.bind(callback, context);
Function __scheduleActivity
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
__scheduleActivity : function(action, key, data) {
var tracker = this.__tracker;
var queue = this.__queue;
var promise = new core.event.Promise(function(resolve, reject) {
queue.push({
Function getLabel
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
getLabel : function(item, root)
{
if (!root) {
root = document.body;
}
- 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 loadStyleSheet
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
loadStyleSheet : function(assetId)
{
return new core.event.Promise(function(resolve, reject) {
core.io.StyleSheet.load(jasy.Asset.toUri(assetId), function(uri, errornous, data)
{
- 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 set
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
set : function(property, value)
{
if (arguments.length == 2)
{
if (jasy.Env.isSet("debug")) {
Function execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
execute : function(nodes, context)
{
if (context == null) {
context = document;
}
Function loadHtml
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadHtml : function(html, parent, secure)
{
if (!parent) {
parent = document.body;
}
Function zoomTo
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
zoomTo: function(level, animate, originLeft, originTop) {
var self = this;
if (!self.options.zooming) {
Function removeAllListeners
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
removeAllListeners : function(type, capture)
{
if (jasy.Env.isSet("debug"))
{
if (type != null)
Function loadPartial
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadPartial : function(assetId, nostrip)
{
return new core.event.Promise(function(resolve, reject) {
// Auto extract partial name from file name
Function checkMixinMemberConflicts
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var checkMixinMemberConflicts = function(include, members, name)
{
// Simplifies routine
if (!members) {
members = {};
Function query
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
query : function(expression)
{
var splits = expression.split("/");
var current = this;
Function __treeWalker
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
__treeWalker: function(node, base) {
var html = '';
var filter = function(value) {
Function compareTo
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
compareTo : function(other)
{
if (this === other) {
return "equal";
}
Function show
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
show : function(approach)
{
var elem = this.getRoot();
if (!elem) {
return;
Function loadTemplate
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadTemplate : function(assetId, nostrip)
{
return new core.event.Promise(function(resolve, reject) {
// Use cached template if available
Function hide
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
hide : function(approach)
{
var elem = this.getRoot();
if (!elem) {
return;
Function get
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
get : (function()
{
if (jasy.Env.isSet("runtime", "browser")) {
var items = location.search.substring(1).split("&");
} else {