Showing 181 of 235 total issues
Function $get
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function($animateCss, $rootScope, $$AnimateRunner, $rootElement, $document, $sniffer) {
Avoid deeply nested control flow statements. Open
Open
if (angular.isDefined(templateUrl)) {
nextRoute.loadedTemplateUrl = $sce.valueOf(templateUrl);
template = $templateRequest(templateUrl);
}
Function restangularizeElem
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function restangularizeElem(parent, element, route, fromServer, collection, reqParams) {
Method set_params_from_torrent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def set_params_from_torrent
unless request.params['torrent']['torrent_file'].blank?
torrent_params = request.params['torrent']
b =
if torrent_params['torrent_file'].respond_to?(:path)
- 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
Open
if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) ||
(isObjectLike(value) && isFunction(value.splice)))) {
return !value.length;
}
Consider simplifying this complex logical expression. Open
Open
if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) ||
(!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {
return false;
}
Consider simplifying this complex logical expression. Open
Open
if (data && isLaziable(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) {
wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
} else {
wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func);
}
Function transformElem
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
config.transformElem = function(elem, isCollection, route, Restangular, force) {
Function groupEventedAnimations
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function groupEventedAnimations(element, event, options, animations, fnName) {
Function link
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
link: function(scope, $element, attr, ctrl, $transclude) {
Function baseReduce
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function baseReduce(collection, iteratee, accumulator, initFromCollection, eachFunc) {
Function transformElem
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
config.transformElem = function(elem, isCollection, route, Restangular, force) {
Function executeAnimationFn
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function executeAnimationFn(fn, element, event, options, onDone) {
Function baseMerge
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function baseMerge(object, source, customizer, stackA, stackB) {
Function packageAnimations
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function packageAnimations(element, event, options, animations, fnName) {
Function $get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function($$jqLite, $rootScope, $injector, $$AnimateRunner, $$rAFScheduler) {
Function restangularizeBase
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function restangularizeBase(parent, elem, route, reqParams, fromServer) {
Function customFunction
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function customFunction(operation, path, params, headers, elem) {
Function elemFunction
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function elemFunction(operation, what, params, obj, headers) {
Function resolveForFallbackLanguage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
var resolveForFallbackLanguage = function (fallbackLanguageIndex, translationId, interpolateParams, Interpolator, defaultTranslationText) {