Showing 180 of 222 total issues
Function hide
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
hide : function (el, css) {
// is modal
if (css) {
var settings = el.data(this.attr_name(true) + '-init'),
context = this;
Function events
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function (instance) {
var self = this;
var S = this.S;
self.create(this.S(instance));
Function events
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function (scope) {
var self = this,
S = self.S,
$scroll_container = $('.scroll-container');
Function events
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function (scope) {
var self = this,
S = self.S,
$scroll_container = $('.scroll-container');
Method create_template_profile_fields_where_non_existant
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
def create_template_profile_fields_where_non_existant
if self.profile_fields.where(label: :personal_title).count == 0
self.profile_fields.create(label: :personal_title, type: "ProfileFieldTypes::General")
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 set_ui
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
set_ui : function ($handle, value) {
var settings = $.data($handle[0], 'settings'),
handle_l = $.data($handle[0], 'handle_l'),
bar_l = $.data($handle[0], 'bar_l'),
norm_pct = this.normalized_percentage(value, settings.start, settings.end),
Function equalize
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
equalize : function (equalizer) {
var isStacked = false,
group = equalizer.data('equalizer'),
settings = equalizer.data(this.attr_name(true)+'-init') || this.settings,
vals,
Function set_ui
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
set_ui : function ($handle, value) {
var settings = $.data($handle[0], 'settings'),
handle_l = $.data($handle[0], 'handle_l'),
bar_l = $.data($handle[0], 'bar_l'),
norm_pct = this.normalized_percentage(value, settings.start, settings.end),
Function equalize
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
equalize : function (equalizer) {
var isStacked = false,
group = equalizer.data('equalizer'),
settings = equalizer.data(this.attr_name(true)+'-init') || this.settings,
vals,
Function start
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
start : function () {
var self = this,
$this = $('[' + this.attr_name() + ']', this.scope),
integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
int_settings_count = integer_settings.length;
Function start
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
start : function () {
var self = this,
$this = $('[' + this.attr_name() + ']', this.scope),
integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
int_settings_count = integer_settings.length;
Function events
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function () {
var self = this,
S = self.S,
settings = self.settings;
Function events
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function () {
var self = this,
S = self.S,
settings = self.settings;
Method rights_for_signed_in_users
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def rights_for_signed_in_users
#
# Inherited from your_platform:
# - terms of use
# - users
Method check_corporation_memberships_consistency_for
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def check_corporation_memberships_consistency_for(netenv_user)
# Aktivmeldungsdatum?
if not netenv_user.aktivmeldungsdatum
warning = { message: 'Kein Aktivmeldungsdatum angegeben.',
Function events
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function () {
var self = this,
S = this.S;
var usual_tab_behavior = function (e, target) {
Function events
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events : function () {
var self = this,
S = this.S;
var usual_tab_behavior = function (e, target) {
Function _base
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_base : function (t) {
var o_p = this.offsetParent(),
o = o_p.offset(),
p = t.offset();
Function _base
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_base : function (t) {
var o_p = this.offsetParent(),
o = o_p.offset(),
p = t.offset();
Method import
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def import
log.head "External Corporations Import"
log.section "Import Parameters"
log.info "Import file: #{@filename}"