Showing 566 of 915 total issues
Function findPluginMethods
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
function findPluginMethods(pluginId, loadedParams, pluginsUrlMatches, usedMethods, usedParams, methods, scannedPluginsIds, usedDomains, mandatoryParams) {
/*
* Params:
*
Function marked
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
function marked(src, opt, callback) {
if (callback || typeof opt === 'function') {
if (!callback) {
callback = opt;
opt = null;
Function findBestFittedLink
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.iframely.findBestFittedLink = function(targetWidth, targetHeight, links) {
var sizedLinks = $.iframely.filterLinks(links, function(link) {
var media = link.media;
return media && media.width && media.height;
Function getPath
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getPath(url) {
// Format the string if it needs it
url = url.replace(/\@\{([a-z\_\-]+)(\|.*?)?\}/gi, function(m, key, defaults) {
var val = defaults ? defaults.replace(/^\|/, '') : '';
Function getWhitelistLogData
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getWhitelistLogData(meta, oembed) {
var r = {};
if (meta) {
Function MapPopUpTemplateService
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function MapPopUpTemplateService($filter, SourceTypeService, JsonFieldAccessorService, RichTextService) {
var service = {};
service.genImportedStatus = function(status, profile) {
- 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 18 (exceeds 5 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"));
}
- 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 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
getData: function(urlMatch, request, options, cb) {
var api_key = options.getProviderOptions('youtube.api_key');
if (!api_key) {
File analyze.js
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
/* global angular, L, $ */
/* jshint unused:false */
var controllersModule = require('./_index');
Function Event
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Event: function() {
var separator = /[\s\,]+/;
// If this doesn't support getPrototype then we can't get prototype.events of the parent
Function submit
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
$scope.submit = function() {
if (!$scope.inputs.url) {
$scope.messages.error = 'Please provide a valid source url';
return;
}
Function asyncMethodCb
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
asyncMethodCb = function(error, result) {
if (aborted) {
return;
}
Function self
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
(function self() {
var CURRENT_TIME = ((new Date()).getTime() / 1e3);
var emit = function(eventName) {
hello.emit('auth.' + eventName, {
Function parseRepeatAttr
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
ctrl.parseRepeatAttr = function(repeatAttr, groupByExp, groupFilterExp) {
function updateGroups(items) {
var groupFn = $scope.$eval(groupByExp);
ctrl.groups = [];
angular.forEach(items, function(item) {
Function addPointsToMap
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addPointsToMap(map, tweets, markerType, cbOnMapAction) {
var addLayer;
if (markerType === "simpleCircle") {
addLayer = L.geoJson([tweets], {
style: function (feature) { return feature.properties && feature.properties.style; },
Function getLink
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
getLink: function(oembed, whitelistRecord) {
if (!(oembed.type === "rich" && whitelistRecord.isAllowed && whitelistRecord.isAllowed('oembed.rich'))) {
return;
Function findWhitelistRecordFor
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
whitelist.findWhitelistRecordFor = function(uri, options) {
if (!whitelistObject) {
return null;
}
Function getContentType
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
exports.getContentType = function(uriForCache, uriOriginal, options, cb) {
cache.withCache("content-type:" + uriForCache, function(cb) {
var timeout, requestInstance, totalTime;
- 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 chart
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function chart (type) {
return {
restrict: 'CA',
scope: {
data: '=',
Function uploadDrive
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
function uploadDrive(p, callback) {
var data = {};
// Test for DOM element