Showing 121 of 349 total issues
File docs.py
has 1091 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Narrative API documentation."""
BEGINNING_IMAGE_NUMBER = '''
Unique identifier for the electronic or paper report. This number is used to construct
PDF URLs to the original document.
File schemas.py
has 944 lines of code (exceeds 250 allowed). Consider refactoring. Open
import re
import functools
import json
from collections import namedtuple
File marked.js
has 901 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* marked - a markdown parser
* Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
* https://github.com/chjj/marked
*/
Function render
has a Cognitive Complexity of 102 (exceeds 5 allowed). Consider refactoring. Open
render: function() {
var a, auth, auths, code, contentTypeModel, isMethodSubmissionSupported, k, key, l, len, len1, len2, len3, len4, m, modelAuths, n, o, p, param, q, ref, ref1, ref2, ref3, ref4, ref5, responseContentTypeView, responseSignatureView, schema, schemaObj, scopeIndex, signatureModel, statusCode, successResponse, type, v, value;
isMethodSubmissionSupported = jQuery.inArray(this.model.method, this.model.supportedSubmitMethods()) >= 0;
if (!isMethodSubmissionSupported) {
this.model.isReadOnly = true;
- 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 args.py
has 658 lines of code (exceeds 250 allowed). Consider refactoring. Open
import functools
from marshmallow.compat import text_type
import sqlalchemy as sa
File OperationView.js
has 648 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
SwaggerUi.Views.OperationView = Backbone.View.extend({
invocationUrl: null,
File itemized.py
has 647 lines of code (exceeds 250 allowed). Consider refactoring. Open
import marshmallow as ma
import sqlalchemy as sa
from sqlalchemy.ext.hybrid import hybrid_property
from sqlalchemy.dialects.postgresql import TSVECTOR
Function token
has 213 lines of code (exceeds 25 allowed). Consider refactoring. Open
Lexer.prototype.token = function(src, top, bq) {
var src = src.replace(/^ +$/gm, '')
, next
, loose
, cap
File reports.py
has 506 lines of code (exceeds 250 allowed). Consider refactoring. Open
from webservices import docs, utils
from .base import db, BaseModel
from sqlalchemy.ext.hybrid import hybrid_property
File index_management.py
has 466 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logging
import elasticsearch
from webservices import utils
Function render
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
var a, auth, auths, code, contentTypeModel, isMethodSubmissionSupported, k, key, l, len, len1, len2, len3, len4, m, modelAuths, n, o, p, param, q, ref, ref1, ref2, ref3, ref4, ref5, responseContentTypeView, responseSignatureView, schema, schemaObj, scopeIndex, signatureModel, statusCode, successResponse, type, v, value;
isMethodSubmissionSupported = jQuery.inArray(this.model.method, this.model.supportedSubmitMethods()) >= 0;
if (!isMethodSubmissionSupported) {
this.model.isReadOnly = true;
Function showStatus
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
showStatus: function(response) {
var url, content;
if (response.content === undefined) {
content = response.data;
url = response.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
File load_legal_docs.py
has 391 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/env python
import itertools
import re
from zipfile import ZipFile
File rest.py
has 354 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
A RESTful web service supporting fulltext and field-specific searches on FEC data. For
full documentation visit: https://api.open.fec.gov/developers.
"""
from webservices.env import env
Function output
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
InlineLexer.prototype.output = function(src) {
var out = ''
, link
, text
, href
Function submitOperation
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
submitOperation: function(e) {
var error_free, form, isFileUpload, l, len, len1, len2, m, map, n, o, opts, ref1, ref2, ref3, val;
if (e !== null) {
e.preventDefault();
}
- 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 apply_ao_specific_query_params
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def apply_ao_specific_query_params(query, **kwargs):
must_clauses = []
if kwargs.get('ao_no'):
must_clauses.append(Q('terms', no=kwargs.get('ao_no')))
- 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 utils.py
has 327 lines of code (exceeds 250 allowed). Consider refactoring. Open
import re
import functools
import json
import logging
Function submitOperation
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
submitOperation: function(e) {
var error_free, form, isFileUpload, l, len, len1, len2, m, map, n, o, opts, ref1, ref2, ref3, val;
if (e !== null) {
e.preventDefault();
}
Function tok
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Parser.prototype.tok = function() {
switch (this.token.type) {
case 'space': {
return '';
}