Showing 126 of 222 total issues
File foundation.orbit.js
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs = Foundation.libs || {};
Function onLoginComplete
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
onLoginComplete: function(result) {
// Scroll the window to bottom of the #sub-header.
var $subHeader = $("#sub-header");
var position = $subHeader.offset().top + $subHeader.height();
$("html, body").animate({scrollTop: position }, 'slow', function(){
Function login_decorator
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def login_decorator(func):
"""
Decorate the :meth:`.BaseProvider.login` implementations with this
decorator.
- 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 events
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
events : function () {
var self = this;
$(this.scope)
.on('change.fndtn.forms', 'form.custom select:not([data-customforms="disabled"])', function (e) {
Function create_request_elements
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def create_request_elements(
cls, request_type, credentials, url, params=None, headers=None,
body='', method='GET', verifier='', callback=''
):
"""
- 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 any
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def any(self, provider_name):
result = authomatic.login(Webapp2Adapter(self), provider_name)
if result:
- 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 events
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
events : function () {
var self = this;
var offst = this.outerHeight($('.top-bar'));
$(this.scope)
.on('click.fndtn.topbar', '.top-bar .toggle-topbar', function (e) {
File config-template.py
has 279 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
"""
Keys with leading underscore are our custom provider-specific data.
"""
Function events
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
events : function () {
var self = this;
$(this.scope).on('arrival.fndtn.magellan', '[data-magellan-arrival]', function (e) {
var $destination = $(this),
$expedition = $destination.closest('[data-magellan-expedition]'),
Function _update_or_create_user
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def _update_or_create_user(self, data, credentials=None, content=None):
"""
Updates or creates :attr:`.user`.
:returns:
- 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 foundation.js
has 272 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Foundation Responsive Library
* http://foundation.zurb.com
* Copyright 2013, ZURB
* Free to use under the MIT license.
BaseProvider
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class BaseProvider(object):
"""
Abstract base class for all providers.
"""
File foundation.forms.js
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*jslint unparam: true, browser: true, indent: 2 */
;(function ($, window, document, undefined) {
'use strict';
Function show
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
show : function (init) {
var $timer = null;
// are we paused?
if (this.settings.$li === undefined
Function append_custom_select
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
append_custom_select : function (idx, sel) {
var self = Foundation.libs.forms,
$this = $( sel ),
$customSelect = $this.next( 'div.custom.dropdown' ),
$customList = $customSelect.find( 'ul' ),
Function backend
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def backend(self, adapter):
"""
Converts a *request handler* to a JSON backend which you can use with
:ref:`authomatic.js <js>`.
- 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 _fetch
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def _fetch(self, url, method='GET', params=None, headers=None,
body='', max_redirects=5, content_parser=None,
certificate_file=None, ssl_verify=True):
"""
Fetches a URL.
- 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 _goto
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
_goto: function($slides_container, index_or_direction, callback) {
var self = this,
$container = $slides_container.parent(),
$slides = $slides_container.children(),
$active_slide = $slides_container.find('.' + self.settings.active_slide_class),
Function access
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def access(self, url, **kwargs):
# https://developer.github.com/v3/#user-agent-required
# GitHub requires that all API requests MUST include a valid ``User-Agent`` header.
headers = kwargs["headers"] = kwargs.get("headers", {})
if not headers.get("User-Agent"):
- 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 pos_default
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
pos_default : function (init) {
var half_fold = Math.ceil($(window).height() / 2),
tip_position = this.settings.$next_tip.offset(),
$nub = this.settings.$next_tip.find('.joyride-nub'),
nub_height = Math.ceil(this.outerHeight($nub) / 2),