Showing 180 of 222 total issues
Function interpret_keyup_action
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
interpret_keyup_action = function (e) {
// Light modification of Heydon Pickering's Practical ARIA Examples: http://heydonworks.com/practical_aria_examples/js/a11y.js
// define current, previous and next (possible) tabs
Method fill_info
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def fill_info
super
self.anzahl_aktivmeldungen = number_of_new_members
self.anzahl_aller_aktiven = corporation.aktivitas.memberships.at_time(end_of_term).count
self.anzahl_burschungen = anzahl_neue BURSCHEN_GROUP_NAMES
Method create_from_dame
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def create_from_dame
raise 'Kein Auftrag zur Datenverarbeitung erteilt.' unless params[:privacy].present?
if params[:dame_type] == "Philister-Gattin"
damen_group = corporation.sub_group("Philister-Gattinnen") || raise("Für die Verbindung #{corporation.name} ist keine Gruppe 'Philister-Gattinnen' vorhanden.")
Function offsets
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
offsets : function (expedition, window_offset) {
var self = this,
settings = expedition.data(self.attr_name(true) + '-init'),
viewport_offset = window_offset;
Function handle_location_hash_change
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handle_location_hash_change : function () {
var self = this,
S = this.S;
Function handle_location_hash_change
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handle_location_hash_change : function () {
var self = this,
S = this.S;
Function offsets
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
offsets : function (expedition, window_offset) {
var self = this,
settings = expedition.data(self.attr_name(true) + '-init'),
viewport_offset = window_offset;
Method leibfamilie
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
def leibfamilie
familie = []
familie << {description: "", user: self}
if leibbursch
relationship = Relationship.where(user1: leibbursch, name: "Leibbursch", user2: self).first
- 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 import_death_from
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
def import_death_from( netenv_user )
if netenv_user.verstorben?
date_of_death = netenv_user.netenv_org_membership_end_date
date_of_death ||= self.memberships.order(:valid_from).last.valid_from + 1.day
- 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 matchMedia
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
window.matchMedia || (window.matchMedia = function() {
"use strict";
// For browsers that support matchMedium api such as IE 9 and webkit
var styleMedia = (window.styleMedia || window.media);
Function matchMedia
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
window.matchMedia || (window.matchMedia = function() {
"use strict";
// For browsers that support matchMedium api such as IE 9 and webkit
var styleMedia = (window.styleMedia || window.media);
Method adapt_bv_to_primary_address
has 27 lines of code (exceeds 25 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
Method import_secondary_corporations_from
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def import_secondary_corporations_from( netenv_user )
last_date_of_joining = netenv_user.aktivmeldungsdatum
netenv_user.secondary_corporations.each do |corporation|
Function init
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init : function (scope, libraries, method, options, response) {
var args = [scope, method, options, response],
responses = [];
// check RTL
Function init
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init : function (scope, libraries, method, options, response) {
var args = [scope, method, options, response],
responses = [];
// check RTL
Function assemble
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
assemble : function (topbar) {
var self = this,
settings = topbar.data(this.attr_name(true) + '-init'),
section = self.S('section, .top-bar-section', topbar);
Function assemble
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
assemble : function (topbar) {
var self = this,
settings = topbar.data(this.attr_name(true) + '-init'),
section = self.S('section, .top-bar-section', topbar);
Function css
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
css : function (dropdown, target) {
var left_offset = Math.max((target.width() - dropdown.width()) / 2, 8),
settings = target.data(this.attr_name(true) + '-init') || this.settings,
parentOverflow = dropdown.parent().css('overflow-y') || dropdown.parent().css('overflow');
Function css
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
css : function (dropdown, target) {
var left_offset = Math.max((target.width() - dropdown.width()) / 2, 8),
settings = target.data(this.attr_name(true) + '-init') || this.settings,
parentOverflow = dropdown.parent().css('overflow-y') || dropdown.parent().css('overflow');
Method fill_in_template_profile_information
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def fill_in_template_profile_information
self.profile_fields.create(label: :personal_title, type: "ProfileFields::General")
self.profile_fields.create(label: :academic_degree, type: "ProfileFields::AcademicDegree")
self.profile_fields.create(label: :cognomen, type: "ProfileFields::General")
self.profile_fields.create(label: :klammerung, type: "ProfileFields::Klammerung")