Showing 91 of 5,698 total issues
Function table
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
table: function(options) {
var table = options.table, key, revCharsTable = options.revCharsTable;
if (!table) {
throw new Error("Encoding '" + options.type +"' has incorect 'table' option");
}
Function SwaggerResource
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function SwaggerResource(resourceObj, api) {
var consumes, e, obj, parts, produces,
_this = this;
this.api = api;
this.api = this.api;
Function submitOperation
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
OperationView.prototype.submitOperation = function(e) {
var error_free, form, map, o, opts, val, _i, _j, _k, _len, _len1, _len2, _ref5, _ref6, _ref7;
if (e != null) {
e.preventDefault();
}
Function render
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
OperationView.prototype.render = function() {
var contentTypeModel, isMethodSubmissionSupported, param, responseContentTypeView, responseSignatureView, signatureModel, statusCode, type, _i, _j, _k, _len, _len1, _len2, _ref5, _ref6, _ref7;
isMethodSubmissionSupported = true;
if (!isMethodSubmissionSupported) {
this.model.isReadOnly = true;
Function next
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
next:function () {
if (this.done) {
return this.EOF;
}
if (!this._input) this.done = true;
Function buildFrom1_1Spec
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SwaggerApi.prototype.buildFrom1_1Spec = function(response) {
var api, isApi, newName, operation, res, resource, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2;
console.log("This API is using a deprecated version of Swagger! Please see http://github.com/wordnik/swagger-core/wiki for more info");
if (response.apiVersion != null) {
this.apiVersion = response.apiVersion;
Function buildFromSpec
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SwaggerApi.prototype.buildFromSpec = function(response) {
var api, isApi, newName, operation, res, resource, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2;
if (response.apiVersion != null) {
this.apiVersion = response.apiVersion;
}
Function format
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
str_format.format = function(parse_tree, argv) {
var cursor = 1, tree_length = parse_tree.length, node_type = '', arg, output = [], i, k, match, pad, pad_character, pad_length;
for (i = 0; i < tree_length; i++) {
node_type = get_type(parse_tree[i]);
if (node_type === 'string') {
Function template
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
template: function(templateSpec) {
// Just add water
var container = {
escapeExpression: Handlebars.Utils.escapeExpression,
invokePartial: Handlebars.VM.invokePartial,
Function parse
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
str_format.parse = function(fmt) {
var _fmt = fmt, match = [], parse_tree = [], arg_names = 0;
while (_fmt) {
if ((match = /^[^\x25]+/.exec(_fmt)) !== null) {
parse_tree.push(match[0]);
Function processOptions
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var processOptions = function(request,options) {
request.log.debug("Processing request options ..");
// We'll use `request.emitter` to manage the `on` event handlers.
Function render
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ParameterView.prototype.render = function() {
var contentTypeModel, isParam, parameterContentTypeView, responseContentTypeView, signatureModel, signatureView, template, type;
type = this.model.type || this.model.dataType;
if (this.model.paramType === 'body') {
this.model.isBody = true;
Function addOperations
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SwaggerResource.prototype.addOperations = function(resource_path, ops, consumes, produces) {
var method, o, op, ref, responseMessages, type, _i, _len, _results;
if (ops) {
_results = [];
for (_i = 0, _len = ops.length; _i < _len; _i++) {
Function emit
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
EventEmitter.prototype.emit = function(type) {
// If there is no 'error' event listener then throw.
if (type === 'error') {
if (!this._events || !this._events.error ||
(isArray(this._events.error) && !this._events.error.length))
Function setupParams
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setupParams: function(paramSize, params, useRegister) {
var options = [], contexts = [], types = [], param, inverse, program;
options.push("hash:" + this.popStack());
Function build
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SwaggerApi.prototype.build = function() {
var e, obj,
_this = this;
this.progress('fetching resource list: ' + this.url);
obj = {
Function handle
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Response.prototype.handle = function () {
var xhr = this.xhr;
if (xhr.readyState === 2 && capable.status2) {
try {
this.statusCode = xhr.status;
Function createFunctionContext
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createFunctionContext: function(asObject) {
var locals = this.stackVars.concat(this.registers.list);
if(locals.length > 0) {
this.source[1] = this.source[1] + ", " + locals.join(", ");
Function parse
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Cookie.prototype.parse = function parse(str) {
if(this instanceof Cookie) {
var parts=str.split(";")
, pair=parts[0].match(/([^=]+)=((?:.|\n)*)/)
, key=pair[1]
Function singlebyte
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
singlebyte: function(options) {
// Prepare chars if needed
if (!options.chars || (options.chars.length !== 128 && options.chars.length !== 256))
throw new Error("Encoding '"+options.type+"' has incorrect 'chars' (must be of len 128 or 256)");