Showing 566 of 915 total issues
Function controller
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
controller: function($scope) {
$scope.showDetail = false;
$scope.showMoreAction = false;
$scope.debuggable = true;
Function getPlayer
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getPlayer(iframely_data, options) {
var html5video = false;
function findPlayer(l) {
Function findUsedMethods
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function findUsedMethods(options, debugData, result) {
// Find debug data for specific link.
result = result || [];
Function prepareResult
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
prepareResult: function(error, b, data, cb) {
if (error) {
return cb(error);
}
Function filterLinksByRel
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.filterLinksByRel = function(rel, links, options) {
var options = options || {};
if (typeof rel == "string") {
Function store
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
store: (function() {
var a = ['localStorage', 'sessionStorage'];
var i = -1;
var prefix = 'test';
- 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 MapCreationService
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function MapCreationService($rootScope, MapPopUpTemplateService, SearchService) {
var service = {};
var attribution = 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</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 getLinks
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
getLinks: function(tumblr_post, cb) {
if (tumblr_post.type !== "video") {
cb(null);
}
- 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 getLink
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
getLink: function(twitter) {
if (twitter.card !== 'player' || !twitter.player) {
return;
- 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 prepareLink
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
prepareLink: function(url, link) {
if (link.html || link.template_context || link.template) {
} else {
- 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 sendLogToWhitelist
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
exports.sendLogToWhitelist = function(uri, meta, oembed, whitelistRecord) {
if (!CONFIG.WHITELIST_LOG_URL) {
return
}
- 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 getLinks
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
getLinks: function (meta, oembed, options, cb) {
// When there is no project video, Kikstarter's oEmbed has diff output
// 'meta' param is there to determine if there's a video
// oembed thumbnail is returned as link and not as mixin to avoid empty results and fallback to generic parsers
Function getContentType
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.getContentType = function(uriForCache, uriOriginal, options, cb) {
cache.withCache("content-type:" + uriForCache, function(cb) {
var timeout, requestInstance, totalTime;
Function select
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
ctrl.select = function(item, skipFocusser, $event) {
if (item === undefined || !item._uiSelectChoiceDisabled) {
if ( ! ctrl.items && ! ctrl.search ) return;
Function PushService
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function PushService($q, $http, AppSettings, $rootScope) {
var service = {};
service.pushData = undefined;
Function getLinks
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
getLinks: function(gmap, options) {
if (!gmap.mode) {
return;
}
Function sortLinks
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
var sortLinks = exports.sortLinks = function(links, autoplay_first) {
function sortLinksInner(l1, l2) {
var non_responsive_1 = l1.media && l1.media['width'] && l1.media['height'];
Function wrapContainer
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wrapContainer($element, data) {
var media = data.media;
if (media && media.height && media.width && !media["aspect-ratio"]) {
Function filterLinksByRel
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.iframely.filterLinksByRel = function(rel, links, options) {
var options = options || {};
if (typeof rel == "string") {
Function getData
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
getData: function(url, urlMatch, options, cb) {
if (!options.getProviderOptions('google.maps_key')) {
return cb (new Error ("No google.maps_key configured"));
}