Showing 30 of 73 total issues
Function getPortlets
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var getPortlets = function() {
return checkMarketplaceCache().then(function(data) {
var successFn;
var errorFn;
var defer;
Function moveWithKeyboard
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.moveWithKeyboard = function(widget, event) {
// Get index independent of ng-repeat to avoid filter bugs
var currentIndex =
findLayoutIndex($scope.layout, 'nodeId', widget.nodeId);
var previousIndex = currentIndex - 1;
Function init
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var init = function() {
// init variables
$scope.portlets = [];
marketplaceService.getPortlets().then(function(data) {
$scope.portlets = data.portlets;
Function filterAppsBySearchTerm
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var filterAppsBySearchTerm = function(apps) {
// Filter by title matches first
var appsWithMatchingTitle =
marketplaceService.filterPortletsBySearchTerm(
apps,
Function getExclusiveMarkup
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var getExclusiveMarkup = function(portlet) {
return $http.get(SERVICE_LOC.context +
'/p/' + portlet.fname + '/exclusive/render.uP', {cache: true})
.then(function(result) {
var data = result.data;
Function invokeCallback
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function invokeCallback(expression, event, dropEffect, itemType, index, item) {
Function moveStuff
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
index, length, sourceId, previousNodeId, nextNodeId) {
Avoid too many return
statements within this function. Open
Open
if (!data) return stopDragover();
Avoid too many return
statements within this function. Open
Open
return false;
Avoid too many return
statements within this function. Open
Open
return false;