Showing 566 of 915 total issues
Function getLinks
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
getLinks: function(urlMatch, oembed, twitter, options) {
var links = [];
if (twitter.image && twitter.image.indexOf && twitter.image.indexOf(urlMatch[1]) > -1) {
Function finish
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function finish(error, data) {
if (timeout) {
clearTimeout(timeout);
timeout = null;
Function prepareLink
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
prepareLink: function(url, link) {
if (link.html || link.template_context || link.template) {
} else {
Function AdvancedSearchCtrl
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
function AdvancedSearchCtrl($http, $scope, $filter, $location, $stateParams, AppSettings, SearchService, MapPopUpTemplateService, MapCreationService) {
Function findPluginMethods
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
function findPluginMethods(pluginId, loadedParams, pluginsUrlMatches, usedMethods, usedParams, methods, scannedPluginsIds, usedDomains, mandatoryParams) {
Function resolve
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var resolve = function (promise, x) {
/* sanity check arguments */ /* [Promises/A+ 2.3.1] */
if (promise === x || promise.proxy === x) {
promise.reject(new TypeError("cannot resolve promise with itself"));
return;
Function popup
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
popup: function(url, redirectUri, options) {
var documentElement = document.documentElement;
// Multi Screen Popup Positioning (http://stackoverflow.com/a/16861050)
Function findThumb
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var findThumb = function(data) {
// Loop round 1 finding thumbnail that also has a social media rel
var keepSearching = true;
var i = 0;
Function isAuthorized
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var isAuthorized = function (req, res, next) {
function parseAccessToken(accessToken) {
var splitted = accessToken.split(":"),
oauth_token = splitted[0],
Function findThumb
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var findThumb = function(data) {
// Loop round 1 finding thumbnail that also has a social media rel
var keepSearching = true;
var i = 0;
Function _onControlsTap
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _onControlsTap = function(e) {
if(_blockControlsTap) {
return true;
}
Function getData
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
getData: function (url, urlMatch, request, cb) {
request({
uri: "https://api.vk.com/method/wall.getById", //?posts=-76229642_10505
qs: {
Function getLink
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
getLink: function(cheerio) {
var videoObjectSchema = 'VideoObject';
var $scope = cheerio('[itemscope][itemtype*="' + videoObjectSchema + '"]');
Function _findKeyMeta
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _findKeyMeta(k) {
var _ = require('underscore');
var sk = safeKey(k);
Function findBestMedia
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function findBestMedia(m1, m2) {
if (!m1 && !m2) {
return m1;
}
Function init
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
init: function(services, options) {
var utils = this.utils;
if (!services) {
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
getLink: function(meta) {
function findIcons(links, filter) {
var key, l;
- 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 getData
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
getData: function(url, og, whitelistRecord) {
// do not process if there is a whitelist record for this domain as processing will take longer
if (!whitelistRecord.isDefault && whitelistRecord.isAllowed && whitelistRecord.isAllowed('og.video')) {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 getLink
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
getLink: function(meta) {
var href = meta.video_src.href || meta.video_src;
if (href && /\.mp4$/.test(href)) {
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
getLink: function (meta, whitelistRecord) {
if (meta.video_src && whitelistRecord.isAllowed && whitelistRecord.isAllowed('html-meta.video')) {
var player = {
- 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"