Showing 161 of 406 total issues
Function parse
has 2317 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parse(input) {
var options = arguments.length > 1 ? arguments[1] : {},
peg$FAILED = {},
File sparql-parser.js
has 2341 lines of code (exceeds 250 allowed). Consider refactoring. Open
define([],function(){
return (function() {
/*
* Generated by PEG.js 0.8.0.
*
Function str
has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring. Open
function str(key, holder) {
// Produce a string from holder[key].
var i, // The loop counter.
- 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 peg$parseRule
has 198 lines of code (exceeds 25 allowed). Consider refactoring. Open
function peg$parseRule(index) {
var bc = peg$bytecode[index],
ip = 0,
ips = [],
end = bc.length,
Function Class
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
var Class = (function() {
// Claus: Copied together code from PrototypeJS to make its class file self-contained.
// There is also a klass lib in bower, but I collected too many battle scars
- 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 serializeRec
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
serializeRec: function(obj, context) {
var result;
// var id = context.getOrCreateId(obj);
- 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 Class
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Class = (function() {
// Claus: Copied together code from PrototypeJS to make its class file self-contained.
// There is also a klass lib in bower, but I collected too many battle scars
Function createAttrQuery
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
createAttrQuery: function(attrQuery, attrVar, isLeftJoin, filterConcept, limit, offset, forceSubQuery) {
var attrConcept = new Concept(new ElementSubQuery(attrQuery), attrVar);
var renamedFilterConcept = ConceptUtils.createRenamedConcept(attrConcept, filterConcept);
- 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
Query
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
var Query = Class.create({
classLabel: 'jassa.sparql.Query',
initialize: function() {
this.type = 0; // select, construct, ask, describe
Function execSelect
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
execSelect: function() {
//var self = this;
var cacheKey = this.cacheKey;
Function createQuery
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
createQuery: function() {
var tableMod = this.tableMod;
var element = this.elementFactory.createElement();
if(!element) {
File ConceptUtils.js
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
var Node = require('../rdf/node/Node');
var NodeFactory = require('../rdf/NodeFactory');
var Triple = require('../rdf/Triple');
var HashMap = require('../util/collection/HashMap');
Function serializeRec
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
serializeRec: function(obj, context) {
var result;
// var id = context.getOrCreateId(obj);
Function createAttrQuery
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
createAttrQuery: function(attrQuery, attrVar, isLeftJoin, filterConcept, limit, offset, forceSubQuery) {
var attrConcept = new Concept(new ElementSubQuery(attrQuery), attrVar);
var renamedFilterConcept = ConceptUtils.createRenamedConcept(attrConcept, filterConcept);
Function createRexLookupService
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
createRexLookupService: function(sparqlService) {
var store = new StoreFacade(sparqlService, {
// 'rdf': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
// 'llo': 'http://www.linklion.org/ontology#'
Function createQueryFacet
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
createQueryFacet: function(element, tableMod) {
if(!element) {
return null;
}
FacetNode
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
ns.FacetNode = Class.create({
initialize: function(varNode, step, parent, root) {
this.parent = parent;
this.root = root;
if(!this.root) {
FacetNode
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
var FacetNode = Class.create({
initialize: function(varNode, step, parent, root) {
this.parent = parent;
this.root = root;
if(!this.root) {
Function str
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
function str(key, holder) {
// Produce a string from holder[key].
var i, // The loop counter.
Function compile
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
compile: function(elem, attrs) {
if(!this.instanceId) {
this.instanceId = 0;
}