Showing 566 of 915 total issues
Function getLink
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
getLink: function(url, options) {
url = URL.parse(url,true);
var query = url.query;
Function link
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function(scope, element, attrs, $select) {
if (scope[attrs.uiSelectSort] === null) {
throw uiSelectMinErr('sort', "Expected a list to sort");
}
Function link
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function(s, e, a){
var that, update;
if (!e.hasClass('ui')) {
e.addClass('btn-group');
}
Function getOembed
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.getOembed = function(uri, data, options) {
if (!data) {
return;
}
Function MapPopUpTemplateService
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MapPopUpTemplateService($filter, SourceTypeService, JsonFieldAccessorService, RichTextService) {
var service = {};
service.genImportedStatus = function(status, profile) {
Function getImageMetadata
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.getImageMetadata = function(uri, options, callback){
if (typeof options === 'function') {
callback = options;
options = {};
Function getMeta
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
getMeta: function(meta, url) {
// Player.
var has_player = false;
- 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 26 (exceeds 5 allowed). Consider refactoring. Open
getLinks: function(url, youtube_video_gdata, options) {
var params = options.getProviderOptions('youtube.get_params', '');
/** Extract ?t=12m15s, ?t=123, ?start=123, ?stop=123, ?end=123
- 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
Consider simplifying this complex logical expression. Open
if (!i.compiled) {
if (i.compiled = !0,
i.k = i.k || i.bK,
i.k) {
var s = {}
Function createModule
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
var createModule = function(angular) {
var module = angular.module('FBAngular', []);
module.factory('Fullscreen', ['$document', '$rootScope', function ($document,$rootScope) {
var document = $document[0];
File datetimepicker.js
has 317 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*globals define, jQuery, module, require */
/*jslint vars:true */
/**
* @license angular-bootstrap-datetimepicker version: 0.3.12
Function mapLayoutDirective
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
function mapLayoutDirective(MapPopUpTemplateService, $interval, $location, MapCreationService) {
return {
scope: {
data: '=',
- 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 25 (exceeds 5 allowed). Consider refactoring. Open
getLink: function(oembed, whitelistRecord) {
if (!(oembed.type === "rich" && whitelistRecord.isAllowed && whitelistRecord.isAllowed('oembed.rich'))) {
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 merge
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
function merge(parentObj, props, value) {
/*
Test urls:
http://www.travelchannel.com/video/its-a-real-life-video-game
- 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 link
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function(scope, element, attrs, ctrls) {
var $select = ctrls[0];
var ngModel = ctrls[1];
Function Routes
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Routes($stateProvider, $locationProvider, $urlRouterProvider, $httpProvider, cfpLoadingBarProvider) {
$locationProvider.html5Mode(true);
$stateProvider
.state('Home', {
Function runMethods
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runMethods(methods, context, pluginsUrlMatches, options, asyncMethodCb) {
// Sync results list.
var results = [];
File HTMLMetaHandler.js
has 313 lines of code (exceeds 250 allowed). Consider refactoring. Open
var decodeHTML5 = require('entities').decodeHTML5;
var _ = require('underscore');
var url = require('url');
var utils = require('../../../utils');
Function Promise
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
Promise: (function(){
/* promise states [Promises/A+ 2.1] */
var STATE_PENDING = 0; /* [Promises/A+ 2.1.1] */
var STATE_FULFILLED = 1; /* [Promises/A+ 2.1.2] */
var STATE_REJECTED = 2; /* [Promises/A+ 2.1.3] */
File search.js
has 311 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
/* global angular, L, map */
/* jshint unused:false */
var controllersModule = require('./_index');