Showing 306 of 628 total issues
Method proposal_html
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
def proposal_html(note)
return "" unless note.respond_to?(:proposal) && note.proposal
case note.proposal.type
when "ProposalNewClass"
html = <<-html
Function runBinders
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
runBinders: function ()
{
while (this.binders.length > 0)
{
var binder = this.binders.shift();
Function formComplete_formatItem
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
function formComplete_formatItem(row) {
var input = this.extraParams.input;
var BP_include_definitions = jQuery(input).attr("data-bp_include_definitions");
if (typeof BP_include_definitions === "undefined") {
File bindonce.js
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function () {
"use strict";
/**
* Bindonce - Zero watches binding for AngularJs
* @version v0.3.3
Method index
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
def index
@app_name = "FacetedBrowsing"
@app_dir = "/browse"
@base_path = @app_dir
ontologies = LinkedData::Client::Models::Ontology.all(include: LinkedData::Client::Models::Ontology.include_params + ",viewOf", include_views: true, display_context: false)
Function _showStatusMessages
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function _showStatusMessages(success, errors, notices, isAppendMode) {
if (success.length > 0) {
if (isAppendMode) {
var appendStr = (jQuery.trim(jQuery('#success_message').html()).length) ? ", " : "";
jQuery("#success_message").append(appendStr + success.join(", ")).html();
- 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 onSuccessAction
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
UpdateCheck.prototype.onSuccessAction = function(data, ontology, deferredObj) {
var self = this;
delete data["success"];
updateInfo = data["update_info"];
- 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
Method build_tree
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def build_tree(node, string, id)
if node.children.nil? || node.children.length < 1
return string # unchanged
end
node.children.sort! {|a,b| (a.prefLabel || a.id).downcase <=> (b.prefLabel || b.id).downcase}
- 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 formComplete_setup_functions
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function formComplete_setup_functions() {
jQuery("input[class*='bp_form_complete']").each(function(){
var classes = this.className.split(" ");
var values;
var ontology_id;
Method _process_ontologies
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def _process_ontologies(success_keyword, error_keyword, process_proc)
response = { errors: '', success: '' }
if params['ontologies'].blank?
response[:errors] = "No ontologies parameter passed. Syntax: ?ontologies=ONT1,ONT2,...,ONTN"
- 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 application_helper.rb
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'uri'
require 'cgi'
require 'digest/sha1'
require 'pry' # used in a rescue
Function _ajaxCall
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
AjaxAction.prototype._ajaxCall = function() {
var self = this;
var success = [];
var errors = [];
var notices = [];
Function $IntervalProvider
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
angular.mock.$IntervalProvider = function() {
this.$get = ['$browser', '$rootScope', '$q', '$$q',
function($browser, $rootScope, $q, $$q) {
var repeatFns = [],
nextRepeatId = 0,
Function bp_internal_formComplete_setup_functions
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function bp_internal_formComplete_setup_functions() {
jQuery("input[class*='bp_internal_form_complete']").each(function(){
var classes = this.className.split(" ");
var values;
var ontology_id;
Method json_search
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def json_search
if params[:q].nil?
render :text => "No search class provided"
return
end
- 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 $get
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
function($browser, $rootScope, $q, $$q) {
var repeatFns = [],
nextRepeatId = 0,
now = 0;
Function setupModuleLoader
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setupModuleLoader(window) {
var $injectorMinErr = minErr('$injector');
var ngMinErr = minErr('ng');
File text.js
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @license RequireJS text 2.0.10 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/requirejs/text for details
*/
File jquery.ncbo.autocomplete.js
has 272 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*jshint curly: true, eqeqeq: true, undef: true, devel: true, browser: true */
/*global jQuery */
/**
* Turn a text box into an auto suggest box which search's and
Function commitRoute
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
function commitRoute() {
var lastRoute = $route.current;
var nextRoute = preparedRoute;
if (preparedRouteIsUpdateOnly) {