Showing 566 of 915 total issues
Function xhr
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
xhr: function(method, url, headers, data, callback) {
var r = new XMLHttpRequest();
var error = this.error;
Function request
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
request: function(p, callback) {
var _this = this;
var error = _this.error;
Consider simplifying this complex logical expression. Open
if ((typeof (o[x]) === 'function' && o[x].test(args[i])) || (typeof (o[x]) === 'string' && (
(o[x].indexOf('s') > -1 && t === 'string') ||
(o[x].indexOf('o') > -1 && t === 'object') ||
(o[x].indexOf('i') > -1 && t === 'number') ||
(o[x].indexOf('a') > -1 && t === 'object') ||
Function logout
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
logout: function() {
var _this = this;
var utils = _this.utils;
var error = utils.error;
- 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 param
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
param: function(s, formatFunction) {
var b;
var a = {};
var m;
- 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 store
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
store: (function() {
var a = ['localStorage', 'sessionStorage'];
var i = -1;
var prefix = 'test';
Function getLinks
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
getLinks: function(url, youtube_video_gdata, options) {
var params = options.getProviderOptions('youtube.get_params', '');
/** Extract ?t=12m15s, ?t=123, ?start=123, ?stop=123, ?end=123
Function getOembed
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports.getOembed = function(uri, options, callback) {
if (typeof options === 'function') {
callback = options;
options = null;
File advanced-search.js
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
/* global angular, L */
/* jshint unused:false */
var controllersModule = require('./_index');
File signin-twitter.js
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
/* global angular, $ */
/* jshint unused:false */
var directivesModule = require('./_index.js');
Function generate
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
generate: function(data, options) {
var iframelyData = options && options.iframelyData;
var givf = data.rel.indexOf('gifv') > -1;
Function generate
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
generate: function(data, options) {
var iframelyData = options && options.iframelyData;
var givf = data.rel.indexOf('gifv') > -1;
Function prepareResultData
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
function prepareResultData(uri, result, options) {
if (!options.debug) {
// TODO: deep clean?
delete result.allData;
Function runPostPlugins
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runPostPlugins(link, dataRecord, usedMethods, context, pluginsContexts, asyncMethodCb) {
for(var i = 0; i < postPluginsList.length; i++) {
(function() {
Consider simplifying this complex logical expression. Open
if (data.items && data.items.length > 0) {
var entry = data.items[0];
var duration = 0;
File utils.js
has 277 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function() {
GLOBAL.CONFIG = require('./config');
var async = require('async');
Function getLink
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
getLink: function(urlMatch, og, options, cb) {
if (!og.image) {
cb('OG image not available');
- 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 c
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
function c(e) {
function t(e) {
return e && e.source || e
}
function r(r, a) {
Function SourceTypeService
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
function SourceTypeService() {
var service = {};
service.sourceTypeList =
Function controller
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
controller: function($scope, $element, $attrs) {
$scope.comment = "";
$scope.remainingChars = 140;
$scope.status = {};