Showing 91 of 5,698 total issues
File shred.bundle.js
has 2029 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var require = function (file, cwd) {
var resolved = require.resolve(file, cwd || '/');
var mod = require.modules[resolved];
if (!mod) throw new Error(
'Failed to resolve module ' + file + ', tried ' + resolved
File swagger-ui.js
has 1716 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
$(function() {
// Helper function for vertically aligning DOM elements
// http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/
$.fn.vAlign = function() {
File handlebars-1.0.0.js
has 1714 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
Copyright (C) 2011 by Yehuda Katz
Permission is hereby granted, free of charge, to any person obtaining a copy
File swagger.js
has 1151 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Generated by CoffeeScript 1.6.3
(function() {
var ApiKeyAuthorization, PasswordAuthorization, SwaggerApi, SwaggerAuthorizations, SwaggerHttp, SwaggerModel, SwaggerModelProperty, SwaggerOperation, SwaggerRequest, SwaggerResource,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
Function handlebars
has 459 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var handlebars = (function(){
var parser = {trace: function trace() { },
yy: {},
symbols_: {"error":2,"root":3,"program":4,"EOF":5,"simpleInverse":6,"statements":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"inMustache":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"CLOSE_UNESCAPED":24,"OPEN_PARTIAL":25,"partialName":26,"params":27,"hash":28,"dataName":29,"param":30,"STRING":31,"INTEGER":32,"BOOLEAN":33,"hashSegments":34,"hashSegment":35,"ID":36,"EQUALS":37,"DATA":38,"pathSegments":39,"SEP":40,"$accept":0,"$end":1},
terminals_: {2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",31:"STRING",32:"INTEGER",33:"BOOLEAN",36:"ID",37:"EQUALS",38:"DATA",40:"SEP"},
Function resolve
has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring. Open
Open
require.resolve = (function () {
return function (x, cwd) {
if (!cwd) cwd = '/';
if (require._core[x]) return x;
- 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 lexer
has 235 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var lexer = (function(){
var lexer = ({EOF:1,
parseError:function parseError(str, hash) {
if (this.yy.parser) {
this.yy.parser.parseError(str, hash);
Function SwaggerRequest
has 167 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function SwaggerRequest(type, url, params, opts, successCallback, errorCallback, operation, execution) {
var body, e, fields, headers, key, myHeaders, name, obj, param, parent, possibleParams, requestContentType, responseContentType, urlEncoded, value, values,
_this = this;
this.type = type;
this.url = url;
Function sprintf
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var sprintf = (function() {
function get_type(variable) {
return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase();
}
function str_repeat(input, multiplier) {
Function anonymous
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
var $0 = $$.length - 1;
switch (yystate) {
case 1: return $$[$0-1];
Function parse
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parse: function parse(input) {
var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
this.lexer.setInput(input);
this.lexer.yy = this.yy;
this.yy.lexer = this.lexer;
Function SwaggerOperation
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function SwaggerOperation(nickname, path, method, parameters, summary, notes, type, responseMessages, resource, consumes, produces) {
var parameter, v, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3,
_this = this;
this.nickname = nickname;
this.path = path;
Function Response
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Response = function(raw, request, callback) {
var response = this;
this._raw = raw;
// The `._setHeaders` method is "private"; you can't otherwise set headers on
Function createRequest
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var createRequest = function(request) {
var timeout ;
request.log.debug("Creating request ..");
request.log.debug(request);
Function anonymous
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
var YYSTATE=YY_START
switch($avoiding_name_collisions) {
case 0: yy_.yytext = "\\"; return 14;
Function formatXml
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
OperationView.prototype.formatXml = function(xml) {
var contexp, formatted, indent, lastType, lines, ln, pad, reg, transitions, wsexp, _fn, _i, _len;
reg = /(>)(<)(\/*)/g;
wsexp = /[ ]*(.*)[ ]+\n/g;
contexp = /(<.+>)(.+\n)/g;
Function resolve
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
require.resolve = (function () {
return function (x, cwd) {
if (!cwd) cwd = '/';
if (require._core[x]) return x;
Function exports
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(api) {
var validEnv = ['development', 'test', 'production']
var currentEnv = api.env()
var isDevelopmentEnv = api.env('development')
var isProductionEnv = api.env('production')
Function CookieJar
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.CookieJar=CookieJar=function CookieJar() {
if(this instanceof CookieJar) {
var cookies = {} //name: [Cookie]
this.setCookie = function setCookie(cookie) {
Class User
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class User < ApplicationRecord
class ResourceNotFound < ActiveRecord::RecordNotFound
def initialize(resource)
super "Couldn't find User from Webfinger resource #{resource}"
end