Showing 9 of 25 total issues
Function exports
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
Function Class
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
Lettuce.prototype.Class = (function (prototype, ownProperty) {
var lettuceClass = function Klass(_superclass, definition) {
function Class() {
- 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 Class
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Lettuce.prototype.Class = (function (prototype, ownProperty) {
var lettuceClass = function Klass(_superclass, definition) {
function Class() {
Function Klass
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
var lettuceClass = function Klass(_superclass, definition) {
function Class() {
var self = this instanceof Class ? this : new Basic();
self.init.apply(self, arguments);
Function func
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
func: function (s, p1, p2, p3, p4, p5) {
Function defaults
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Lettuce.defaults = function(obj) {
if (!Lettuce.isObject(obj)) {
return obj;
}
- 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 extend
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Lettuce.extend = function (obj) {
if (!Lettuce.isObject(obj)) {
return obj;
}
var source, prop;
- 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 func
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
func: function (s, p1, p2, p3, p4, p5) {
var specialCharMAP = {
"\n": "\\n",
"\r": "\\r",
"\t": "\\t",
- 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
Avoid too many return
statements within this function. Open
return "_s+='";