Showing 566 of 915 total issues
Function append
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
append: function(node, attr, target) {
var n = typeof (node) === 'string' ? document.createElement(node) : node;
if (typeof (attr) === 'object') {
Function getLink
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
getLink: function(urlMatch, request, cb) {
var gistId = urlMatch[2];
var filePermalink = urlMatch[4];
if (!filePermalink) {
Function WallDisplay
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
function WallDisplay($scope, $stateParams, $interval, $timeout, $location, $http, $window, $resource, AppSettings, SearchService, StatisticsService, AppsService, Fullscreen) {
Function controller
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
controller: ['$scope', '$element'].concat(function($scope, $element){
$scope.btntype = $element.attr('btn-type');
$scope.node = this.node = {
d: {},
add: function(e, a){
Function otherDropdown
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.otherDropdown = function(options) {
var $this = this;
// Allow a different name/value to trigger, default to 'other'
var opts = $.extend({}, {value: 'other'}, options);
opts.name_lower = opts.value.toLowerCase();
Function cbOnMap
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
var cbOnMap = function() {
var hintText = '<p class="map-control-hint-text">The first number shows the actual followers. The second number shows the number of followers with a location info. These are displayed on the map.</p>';
$(".leaflet-control-layers-overlays").append(hintText);
$(".map-control-hint").hover(function() {
$(".map-control-hint-text").show();
Function link
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function (scope, elem/*, attrs */) {
var chart, container = document.createElement('div');
function resetChart (newVal, oldVal) {
if (isEmpty(newVal)) { return; }
Function genUserInfoPopUp
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
service.genUserInfoPopUp = function(status) {
var result = "Failed loading data from twitter";
var title;
if (status.isAFollower && status.isAFollowing) {
Function addDoubleTapListener
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
addDoubleTapListener: function(t, i, n) {
function s(t) {
var e;
if (o.Browser.pointer ? (_.push(t.pointerId),
e = _.length) : e = t.touches.length,
Function getLink
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
getLink: function(meta) {
function findIcons(links, filter) {
var key, l;
Function buildScript
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function buildScript(file) {
var bundler = browserify({
entries: config.browserify.entries,
debug: true,
Function link
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function(scope, element) {
/**
* Take the embeded link
* Pic.twitter.com is already render in images and is not processed again
* Debug the link with injected service
Function getLinks
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
getLinks: function(tumblr_post, cb) {
if (tumblr_post.type !== "video") {
cb(null);
}
Function moveMediaAttrs
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function moveMediaAttrs(link) {
if (!link.media) {
var m = {};
// TODO: make for()
Function getData
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
getData: function(oembedLinks, whitelistRecord) {
if (whitelistRecord.isAllowed && whitelistRecord.isAllowed('html-meta.promo')) {
var href = oembedLinks[0].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 13 (exceeds 5 allowed). Consider refactoring. Open
getLink: function(urlMatch, schemaFileObject) {
if (schemaFileObject.embedURL || schemaFileObject.embedUrl) {
var file = {
- 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 testAll
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function testAll(cb) {
// Get all plugins with tests.
var pluginsList = _.values(plugins).filter(function(plugin) {
- 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 findBestMedia
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function findBestMedia(m1, m2) {
if (!m1 && !m2) {
return m1;
}
- 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 dataToJSON
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
dataToJSON: function(p) {
var _this = this;
var w = window;
var data = p.data;
Function fetchFeedUrls
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
var fetchFeedUrls = exports.fetchFeedUrls = function(feedUrl, options, cb) {
if (typeof options === "function") {
cb = options;
options = {};