Showing 98 of 221 total issues
File bootstrap.min.js
has 1185 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* Bootstrap v3.0.2 by @fat and @mdo
* Copyright 2013 Twitter, Inc.
* Licensed under http://www.apache.org/licenses/LICENSE-2.0
*
Function comments
has 308 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function comments(
articleService, $http, $q, $resource, transform, pageTracker,
$log, nestedSort
) {
/* max number of comments per page, decrease it in order to
Function images
has 244 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function images(
pageTracker, $log, articleService,
getFileReader, formDataFactory, imageFactory, NcImage,
$rootScope, $q
) {
File Article.js
has 516 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
/**
* A factory which creates article model.
*
Function comments
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
Open
function comments(
articleService, $http, $q, $resource, transform, pageTracker,
$log, nestedSort
) {
/* max number of comments per page, decrease it in order to
- 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 postLink
has 200 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function postLink(scope, element, attrs, controllers) {
var ctrl = controllers[0],
imgConfig = {},
parentCtrl = controllers[1],
$element = $(element),
Function directiveConstructor
has 175 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function directiveConstructor($rootScope, $modal, $window, toaster) {
var template = [
'<div>',
' <button class="btn btn-default btn-sm" title="Add Link">',
' <i class="fa fa-link"></i>',
Function initStubbedBackend
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function initStubbedBackend() {
ng.module('authoringEnvironmentApp')
.config(['$provide', function($provide) {
$provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator);
}])
Function postLink
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function postLink(scope, element, attrs) {
var children,
cmdLinkEnabled,
cmdLinkSupported,
cmdUnlinkEnabled,
Function images
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
Open
function images(
pageTracker, $log, articleService,
getFileReader, formDataFactory, imageFactory, NcImage,
$rootScope, $q
) {
- 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 linkFunction
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function linkFunction(scope, element, attrs) {
var newIdx = -1, // dragged element's (potential) new position
$emptySlot = null, // DOM marker for the new position
$rootElement, // root DOM element the directive is applied to
draggedElementIdx = -1; // index of the element being dragged
Function decorate
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function decorate(comment) {
/**
* @class comment
*/
Function decorate
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function decorate(comment) {
/**
* @class comment
*/
File comments.js
has 324 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
/**
* AngularJS Service for managing article comments.
*
Function exports
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
File editorial-comments.js
has 314 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
/**
* AngularJS Service for managing article comments.
*
Function postLink
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function postLink(scope, element, attrs) {
var counter,
$element = $(element);
// when dragging over a child element, a dragleave event is
File comments.js
has 292 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
/**
* AngularJS controller for managing article comments (as a group,
* not individual comments).
Function setEventHandlers
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setEventHandlers($element) {
$element.attr('draggable', true);
$element.on('dragstart', function (e) {
var dragData;
Function postLink
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function postLink(scope, element, attrs) {
var checkAvailable,
clickFunction,
clickEvent,
checkEvent;