Showing 222 of 222 total issues
Function open
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
open : function ($image, current, target) {
var self = this,
body = $(document.body),
root = target.closest('.clearing-assembled'),
container = self.S('div', root).first(),
Function open
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
open : function ($image, current, target) {
var self = this,
body = $(document.body),
root = target.closest('.clearing-assembled'),
container = self.S('div', root).first(),
Method adapt_bv_to_primary_address
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
Open
def adapt_bv_to_primary_address
self.groups.reload
new_bv = correct_bv
# Wenn der Philister einen Wunsch-BV hat, wird die automatische Zuordnung
- 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 toggle
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
toggle : function (toggleEl) {
var self = this,
topbar;
if (toggleEl) {
Function toggle
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
toggle : function (toggleEl) {
var self = this,
topbar;
if (toggleEl) {
Function expose
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
expose : function () {
var expose,
exposeCover,
el,
origCSS,
Function expose
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
expose : function () {
var expose,
exposeCover,
el,
origCSS,
Function events
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function (scope) {
var self = this,
S = self.S;
S(this.scope)
Function events
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function (scope) {
var self = this,
S = self.S;
S(this.scope)
Function show
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
show : function (el, css) {
// is modal
if (css) {
var settings = el.data(this.attr_name(true) + '-init') || this.settings,
root_element = settings.root_element,
Function show
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
show : function (el, css) {
// is modal
if (css) {
var settings = el.data(this.attr_name(true) + '-init') || this.settings,
root_element = settings.root_element,
Function reposition
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
reposition : function (target, tip, classes) {
var width, nub, nubHeight, nubWidth, column, objPos;
tip.css('visibility', 'hidden').show();
Function events
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function (scope) {
var self = this,
form = self.S(scope).attr('novalidate', 'novalidate'),
settings = form.data(this.attr_name(true) + '-init') || {};
Function events
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function () {
var self = this;
$(this.scope)
.off('.joyride')
Function reposition
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
reposition : function (target, tip, classes) {
var width, nub, nubHeight, nubWidth, column, objPos;
tip.css('visibility', 'hidden').show();
Function events
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function (scope) {
var self = this,
form = self.S(scope).attr('novalidate', 'novalidate'),
settings = form.data(this.attr_name(true) + '-init') || {};
Function events
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function () {
var self = this;
$(this.scope)
.off('.joyride')
Function _goto
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
self._goto = function (next_idx, start_timer) {
// if (locked) {return false;}
if (next_idx === idx) {return false;}
if (typeof timer === 'object') {timer.restart();}
var slides = self.slides();
Function _goto
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
self._goto = function (next_idx, start_timer) {
// if (locked) {return false;}
if (next_idx === idx) {return false;}
if (typeof timer === 'object') {timer.restart();}
var slides = self.slides();
Consider simplifying this complex logical expression. Open
Open
if not read_only_mode?
can :update, Group do |group|
group.admins_of_self_and_ancestors.include?(user)
end
can :update, Corporation do |group|