Showing 306 of 628 total issues
Method get_class
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def get_class(params)
if @ontology.flat?
ignore_concept_param = params[:conceptid].nil? ||
- 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 bp_notes.js
has 346 lines of code (exceeds 250 allowed). Consider refactoring. Open
var ontNotesTable;
var ont_columns = { archived: 3, date: 7, subjectSort: 2 };
jQuery(".ontologies.show").ready(function(){
setupNotesFaceboxSizing();
Function success
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
success: function(data) {
$('.recommenderSpinner').hide();
if (data) {
if (data.length > 0) {
$("#recommender-results").empty();
Method index
has a Cognitive Complexity of 28 (exceeds 5 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)
- 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 jquery.ncbo.tree-2.0.1.js
has 331 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* jQuery SimpleTree Drag&Drop plugin
* Update on 22th May 2008
* Version 0.3
*
File jquery.ncbo.tree-2.0.0.js
has 331 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* jQuery SimpleTree Drag&Drop plugin
* Update on 22th May 2008
* Version 0.3
*
File jquery.ncbo.tree-2.0.2.js
has 331 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* jQuery SimpleTree Drag&Drop plugin
* Update on 22th May 2008
* Version 0.3
*
Method create
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def create
params[:mappings] ||= []
params[:max_level] ||= 0
params[:ontologies] ||= []
params[:semantic_types] ||= []
- 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 TzDate
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
angular.mock.TzDate = function(offset, timestamp) {
var self = new Date(0);
if (angular.isString(timestamp)) {
var tsStr = timestamp;
Function get_annotations
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_annotations() {
jQuery("#results_error").html("");
jQuery("#annotator_error").html("");
// Validation
Function displayUsers
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
function displayUsers(data) {
let ontTable = null;
let allRows
if (jQuery.fn.dataTable.isDataTable('#adminUsers')) {
ontTable = jQuery('#adminUsers').DataTable();
File ontologies_controller.rb
has 318 lines of code (exceeds 250 allowed). Consider refactoring. Open
class OntologiesController < ApplicationController
include MappingsHelper
include MappingStatistics
require "multi_json"
File app.js
has 317 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
// Declare app level module which depends on views, and components
angular.module('FacetedBrowsing', [
'ngRoute',
File angular-route.js
has 316 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @license AngularJS v1.3.5
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
File bp_recommender.js
has 313 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Namespace for global variables and functions
var rec = { }
rec.maxInputWords = 500;
rec.showOrHideAdvancedOptions = function() {
File form_complete.js
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
// jQuery check, if it's not present then include it
function bpMinVersion(min, actual) {
function parseVersionString (str) {
if (typeof(str) != 'string') { return false; }
var x = str.split('.');
File bp_ontolobridge.js
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
function bindAddRequestTermClick() {
jQuery("a.add_request_term").live('click', function(){
var id = jQuery(this).attr("data-parent-id");
addRequestTermBox(id);
});
Method show
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def show
# Hack to make ontologyid and conceptid work in addition to id and ontology params
params[:id] = params[:id].nil? ? params[:ontologyid] : params[:id]
params[:ontology] = params[:ontology].nil? ? params[:id] : params[:ontology]
- 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 24 (exceeds 5 allowed). Consider refactoring. Open
AjaxAction.prototype.onSuccessAction = function(data, ontology, deferredObj) {
var self = this;
if (!self.isLongOperation) {
return;
}
- 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 parseTemplate
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseTemplate(template, tags) {
tags = tags || mustache.tags;
template = template || '';
if (typeof tags === 'string') {