Showing 74 of 182 total issues
File bpmn.js
has 1568 lines of code (exceeds 250 allowed). Consider refactoring. Open
var inspector;
/* GRAPH */
var graph = new joint.dia.Graph({ type: 'bpmn' }).on({
Method show
has a Cognitive Complexity of 109 (exceeds 5 allowed). Consider refactoring. Open
def show
authorize @project
@objectives = @project.objectives.where('prioritized = true')
@a_size = 0
@barriers_size = 0
- 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 _apply
has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring. Open
'_apply':function(obj, transform, index, options) {
var element = {'events':[],'html':''};
//Itterate through the transform and create html as needed
- 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 keyboard.js
has 607 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Title: KeyboardJS
* Version: v0.4.1
* Description: KeyboardJS is a flexible and easy to use keyboard binding
* library.
File inspector.js
has 552 lines of code (exceeds 250 allowed). Consider refactoring. Open
var inputs = {
'bpmn.Gateway': {
icon: {
type: 'select',
Method show
has 199 lines of code (exceeds 25 allowed). Consider refactoring. Open
def show
authorize @project
@objectives = @project.objectives.where('prioritized = true')
@a_size = 0
@barriers_size = 0
Function openIHF
has 170 lines of code (exceeds 25 allowed). Consider refactoring. Open
function openIHF(cellView, edit){
var model = cellView.model
var btn_sidebar_right = "#btn-inspector-container",
Function _getValue
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
'_getValue':function(obj, transform, key,index) {
var out = '';
var val = transform[key];
- 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 projects_controller.rb
has 321 lines of code (exceeds 250 allowed). Consider refactoring. Open
class ProjectsController < ApplicationController
before_action :authenticate_user!
before_action :set_project, only: [:show, :edit, :update, :destroy, :solutions, :public, :stage1, :stage2, :share, :overview]
respond_to :html, :json
Function setDivContent
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
setDivContent: function(cell, content) {
var the_date = '';
if( this.has('date'))
the_date = this.get("date")
Function openIHF
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function openIHF(cellView, edit){
var model = cellView.model
var btn_sidebar_right = "#btn-inspector-container",
- 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 _tokenizer
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
'_tokenizer':function( tokenizers, doBuild ){
if( !(this instanceof json2html._tokenizer ) )
return new json2html._tokenizer( tokenizers, doBuild );
- 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 _apply
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
'_apply':function(obj, transform, index, options) {
var element = {'events':[],'html':''};
//Itterate through the transform and create html as needed
Function createBinding
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createBinding(keyCombo, keyDownCallback, keyUpCallback) {
var api = {}, binding, subBindings = [], bindingApi = {}, kI,
subCombo;
//break the combo down into a combo array
Method link_text
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def link_text element_symbol
case element_symbol
when :real_problem
@real_problem.blank? ? 'Articulate the real-world problem children are facing that you want to address' : (@real_problem.title != "." ? @real_problem.title : 'Articulate the real-world problem children are facing that you want to address')
when :policy_problems
- 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 parseKeyCombo
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseKeyCombo(keyCombo) {
var s = keyCombo, i = 0, op = 0, ws = false, nc = false, combos = [], combo = [], stage = [], key = '';
if(typeof keyCombo === 'object' && typeof keyCombo.push === 'function') { return keyCombo; }
if(typeof keyCombo !== 'string') { throw new Error('Cannot parse "keyCombo" because its type is "' + (typeof keyCombo) + '". It must be a "string".'); }
Method objective_link_text
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def objective_link_text objective, element_symbol
case element_symbol
when :actors
objective.actors.blank? ? "List actors and power map" : " #{objective.actors.size} Actors"
when :enabling_factors
- 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 stage1_controller.js
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
app.controller("stage1Ctrl", ["$scope", "$http", "$aside", "$location", "$attrs", function ($scope, $http, $aside, $location, $attrs) {
$scope.project_id = $location.path().split("/")[2];
$scope.messages = {response: "", message: ""}
$http.get('/real_problems/focus_area.json')
.success(function (data) {
Function _tokenizer
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
'_tokenizer':function( tokenizers, doBuild ){
if( !(this instanceof json2html._tokenizer ) )
return new json2html._tokenizer( tokenizers, doBuild );
Function position
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
position: function(p) {
var bbox;
if (p) {
- 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"