Showing 257 of 576 total issues
Function switchClass
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
switchClass: function( remove, add, speed, easing, callback) {
Function list
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function list (format, index, field, count, setter) {
Function galleriaOut
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
galleriaOut: function (_, t, b, c, d) {
Function easeout
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
this.easeout = function (x, t, b, c, d) {
Function dayOfYearFromWeeks
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) {
Function _dialogDatepicker
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
_dialogDatepicker: function(input, date, onSelect, settings, pos) {
Function createLocalOrUTC
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function createLocalOrUTC (input, format, locale, strict, isUTC) {
Function galleriaIn
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
galleriaIn: function (_, t, b, c, d) {
Function substituteTimeAgo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
Function complete
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
var complete = (function( data, next, active, queue, thumb ) {
Function galleria
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
galleria: function (_, t, b, c, d) {
Function init
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
init : function (scope, libraries, method, options, response) {
Avoid too many return
statements within this function. Open
Open
return;
Avoid too many return
statements within this function. Open
Open
return false;
Avoid too many return
statements within this function. Open
Open
return true;
Avoid too many return
statements within this function. Open
Open
return false;
Method delete_checked_pictures
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def delete_checked_pictures
activated_ids = params[:activated].collect {|id| id.to_i} if params[:activated]
seen_ids = params[:seen].collect {|id| id.to_i} if params[:seen]
if activated_ids
- 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"