Showing 124 of 220 total issues
Function contactProvider
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
BaseProvider.prototype.contactProvider = function(requestElements) {
var body, headers, jsonpOptions, method, options, params, url,
_this = this;
url = requestElements.url, method = requestElements.method, params = requestElements.params, headers = requestElements.headers, body = requestElements.body;
Function contactProvider
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
BaseProvider.prototype.contactProvider = function(requestElements) {
var body, headers, jsonpOptions, method, options, params, url,
_this = this;
url = requestElements.url, method = requestElements.method, params = requestElements.params, headers = requestElements.headers, body = requestElements.body;
Function toggle_active
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
toggle_active : function (e, self) {
var $this = $(this),
section = $this.closest('section, .section'),
content = section.find('.content'),
parent = section.closest('[data-section]'),
Function get
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def get(self):
# Create links to the Login handler.
self.response.write('Login with <a href="login/fb">Facebook</a> or ')
self.response.write('<a href="login/tw">Twitter</a>')
- 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 login
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def login(self):
# get request parameters from which we can determine the login phase
denied = self.params.get('denied')
verifier = self.params.get('oauth_verifier', '')
request_token = self.params.get('oauth_token', '')
- 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 create_request_elements
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_request_elements(
Function swipe_events
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
swipe_events : function () {
var self = this;
$(this.scope)
.on('touchstart.fndtn.clearing', '.visible-img', function(e) {
Function __init__
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None):
super(MovedAttribute, self).__init__(name)
if PY3:
if new_mod is None:
new_mod = name
- 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 resize
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
resize : function () {
var sections = $('[data-section]'),
self = Foundation.libs.section;
sections.each(function() {
Function show
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
show : function (el, css) {
// is modal
if (css) {
if (/pop/i.test(this.settings.animation)) {
css.top = $(window).scrollTop() - el.data('offset') + 'px';
Function start
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
start : function () {
var self = this,
$this = $(this.scope).find('[data-joyride]'),
integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
int_settings_count = integer_settings.length;
Function reposition
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
reposition : function (target, tip, classes) {
var width, nub, nubHeight, nubWidth, column, objPos;
tip.css('visibility', 'hidden').show();
Function __init__
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function init
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
init : function (scope, method, options) {
var self = this;
this.scope = scope || this.scope;
if (typeof method === 'object') {
Function setPlaceholder
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setPlaceholder() {
var $replacement,
input = this,
$input = $(input),
$origInput = $input,
Consider simplifying this complex logical expression. Open
if authorization_code or not self.user_authorization_url:
if authorization_code:
# =============================================================
# Phase 2 after redirect with success
Function access
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
BaseProvider.prototype.access = function() {
var callback,
_this = this;
callback = function(data, textStatus, jqXHR) {
Function hide
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
hide : function (el, css) {
// is modal
if (css) {
if (/pop/i.test(this.settings.animation)) {
var end_css = {
Function access
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
BaseProvider.prototype.access = function() {
var callback,
_this = this;
callback = function(data, textStatus, jqXHR) {
Function __repr__
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def __repr__(self):
# get class name
name = self.__class__.__name__
- 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"