Showing 566 of 915 total issues
Function controller
has 227 lines of code (exceeds 25 allowed). Consider refactoring. Open
controller: function($scope, $element, $attrs) {
$scope.harvestingFreqList = HarvestingFrequencyService.values;
$scope.sourceTypeList = SourceTypeService.sourceTypeList;
$scope.sourceTypeListWEndpoint = {};
Function controller
has 223 lines of code (exceeds 25 allowed). Consider refactoring. Open
controller: function($scope) {
var timelineIntervals = [];
$rootScope.root.timelineNewTweets = [];
$rootScope.root.haveNewerTweets = false;
$rootScope.root.doneGettingFeed = false;
Function WallCtrl
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
function WallCtrl($scope, $rootScope, $window, $timeout, AppsService, HelloService, SearchService) {
var vm = this;
var term = '';
var isEditing = -1;
- 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 token
has 213 lines of code (exceeds 25 allowed). Consider refactoring. Open
Lexer.prototype.token = function(src, top) {
var src = src.replace(/^ +$/gm, '')
, next
, loose
, cap
Function controller
has 211 lines of code (exceeds 25 allowed). Consider refactoring. Open
controller: function() {
$rootScope.root.tweet= "";
$rootScope.root.tweetType = 1;
$rootScope.root.tweetLength = 140;
$rootScope.root.userLocation = {};
Function link
has 209 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function link(scope, element, attrs, ngModelController) {
var directiveConfig = {};
if (attrs.datetimepickerConfig) {
Function processPluginTests
has 205 lines of code (exceeds 25 allowed). Consider refactoring. Open
function processPluginTests(pluginTest, plugin, count, cb) {
var testUrlsSet, reachTestObjectFound = false;;
log('===========================================');
Function compile
has 193 lines of code (exceeds 25 allowed). Consider refactoring. Open
compile: function(tElement, tAttrs) {
//Multiple or Single depending if multiple attribute presence
if (angular.isDefined(tAttrs.multiple))
tElement.append("<ui-select-multiple/>").removeAttr('multiple');
Function login
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
login: function() {
// Create an object which inherits its parent as the prototype and constructs a new event chain.
var _this = this;
var utils = _this.utils;
- 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 ChartJsFactory
has 186 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ChartJsFactory (ChartJs) {
function sum (carry, val) {
return carry + val;
}
Function AdvancedSearchCtrl
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
function AdvancedSearchCtrl($http, $scope, $filter, $location, $stateParams, AppSettings, SearchService, MapPopUpTemplateService, MapCreationService) {
var vm = this;
var map = false;
var prevZoomAction, prevPanAction, newZoomAction, newPanAction;
- 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 Promise
has a Cognitive Complexity of 45 (exceeds 5 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] */
- 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 44 (exceeds 5 allowed). Consider refactoring. Open
getLink: function(url, options) {
url = URL.parse(url,true);
var query = url.query;
- 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
File tester.js
has 444 lines of code (exceeds 250 allowed). Consider refactoring. Open
GLOBAL.CONFIG = require('../../config');
if (!CONFIG.tests) {
console.error('Tests not started: CONFIG.tests not configured.');
process.abort();
Function getstatfollower
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
$scope.getstatfollower = function () {
viewloading();
$http.jsonp(AppSettings.apiUrl+"user.json?callback=JSON_CALLBACK", {params : { screen_name :$scope.username, followers : 10000, following : 10000, minified: true } })
.success(function(data, status, headers, config) {
Function responseHandler
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
responseHandler: function(window, parent) {
var _this = this;
var p;
var location = window.location;
- 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
File html-utils.js
has 421 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function() {
var $ = require('cheerio');
var _ = require('underscore');
Function append
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
append: function(node, attr, target) {
var n = typeof (node) === 'string' ? document.createElement(node) : node;
if (typeof (attr) === 'object') {
- 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 xhr
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
xhr: function(method, url, headers, data, callback) {
var r = new XMLHttpRequest();
var error = this.error;
- 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 postTweet
has 150 lines of code (exceeds 25 allowed). Consider refactoring. Open
$rootScope.root.postTweet = function() {
var message = $rootScope.root.tweet;
var tweetLen = twttr.txt.getTweetLength(message);
var tweet = encodeURIComponent(message);