Showing 566 of 915 total issues
Function getData
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
getData: function(url, twitter, 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('twitter.player')) {return;}
Function onGlobalTap
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
ui.onGlobalTap = function(e) {
e = e || window.event;
var target = e.target || e.srcElement;
if(_blockControlsTap) {
Function getLinks
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
getLinks: function(tumblr_post) {
if (tumblr_post.type !== "photo") {
return;
}
Function extend
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
extend: function(r /*, a[, b[, ...]] */) {
// Get the arguments as an array but ommit the initial item
Array.prototype.slice.call(arguments, 1).forEach(function(a) {
if (Array.isArray(r) && Array.isArray(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 getLink
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
getLink: function(oembed, whitelistRecord) {
if (!(oembed.type === "video" && whitelistRecord.isAllowed && whitelistRecord.isAllowed('oembed.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 getData
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
getData: function (url, urlMatch, request, cb) {
request({
uri: "https://api.vk.com/method/wall.getById", //?posts=-76229642_10505
qs: {
- 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 prepareRequestOptions
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
var prepareRequestOptions = exports.prepareRequestOptions = function(request_options) {
if (CONFIG.PROXY) {
var url = request_options.uri || request_options.url;
- 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 findOembedLinks
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
module.exports.findOembedLinks = function(uri, meta) {
// Filter oembed from meta.
var alternate = meta && meta.alternate;
if (alternate && !(alternate instanceof Array)) {
alternate = [alternate];
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
prepareLink: function(url, link, options, cb) {
// Check if need link processing.
function finish() {
- 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 callCb
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
CollectingHandlerForMutliTarget.prototype.callCb = function(event, cbs) {
function cb(cbs) {
if (cbs[event[0]]) {
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
prepareLink: function(link, pluginContext) {
if (!link.href) {
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 $get
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function($rootScope, $log, $interval, $http) {
var state = {
ping: null
};
Function args
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
args: function(o, args) {
var p = {};
var i = 0;
var t = null;
Function link
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function link(scope, element, attrs, $select, transcludeFn) {
// var repeat = RepeatParser.parse(attrs.repeat);
var groupByExp = attrs.groupBy;
var groupFilterExp = attrs.groupFilter;
Function validateConfiguration
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
var validateConfiguration = function validateConfiguration(configuration) {
var validOptions = ['startView', 'minView', 'minuteStep', 'dropdownSelector'];
for (var prop in configuration) {
//noinspection JSUnfilteredForInLoop
Function addPointerListenerStart
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
addPointerListenerStart: function(t, i, n, s) {
var a = "_leaflet_"
, r = this._pointers
, h = function(t) {
o.DomEvent.preventDefault(t);
Function extend
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
o.Class.extend = function(t) {
var e = function() {
this.initialize && this.initialize.apply(this, arguments),
this._initHooks && this.callInitHooks()
}
Function me/share
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
'me/share': function(p, callback) {
var data = p.data;
p.data = null;
Function getViewportOffset
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
getViewportOffset: function(t) {
var i, n = 0, s = 0, a = t, r = e.body, h = e.documentElement;
do {
if (n += a.offsetTop || 0,
s += a.offsetLeft || 0,
Function z
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
router.put('/:user/:app/:id', isAuthorized, function z(req, res) {
getData(req.params.user, function (error, response, body) {
var responseData = JSON.parse(response.body),
appData = responseData.accounts[0].apps,
authData = {},