Showing 15 of 30 total issues
Function breakdown
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
breakdown: function(){
var self = this, selector = self.selector,
parts = [], nested = null, part = '',
i = -1, l = selector.length, c = '',
innerSeek = null;
- 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 breakdown
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
breakdown: function(){
var self = this, value = self.value,
parts = [], i = -1, l = value.length, part = '', c, seek;
for ( ; ++i < l; ) {
- 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 breakdown
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
breakdown: function(){
var self = this, atrule = self.atrule,
parts = [], part = '',
i = -1, l = atrule.length, c = '',
seek;
- 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 breakdown
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
breakdown: function(){
var self = this, selector = self.selector,
parts = [], nested = null, part = '',
i = -1, l = selector.length, c = '',
innerSeek = null;
Function nested
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
nested: function( atrule, position ) {
var self = this,
iter = self.iter,
startPos = null,
string = '',
File CSSTree.js
has 288 lines of code (exceeds 250 allowed). Consider refactoring. Open
var rwhitespace = /(\s|\t|\r\n|\r|\n)/,
leftTrim = /^(\r\n|\r|\n|\t|\s)*/,
StringIterator = global.StringIterator;
Function selector
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
selector: function(){
var self = this,
iter = self.iter,
position = new CSSTree.Position( iter.index + 1 ),
selector = '',
Function breakdown
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
breakdown: function(){
var self = this, value = self.value,
parts = [], i = -1, l = value.length, part = '', c, seek;
for ( ; ++i < l; ) {
Function breakdown
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
breakdown: function(){
var self = this, atrule = self.atrule,
parts = [], part = '',
i = -1, l = atrule.length, c = '',
seek;
Function rules
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
rules: function( parentPos ) {
var self = this,
iter = self.iter,
rules = [],
rule, position;
Function value
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
value: function( position ) {
var self = this,
iter = self.iter,
value = '';
Avoid deeply nested control flow statements. Open
for ( ; ++i < l; ) {
c = value[ i ];
part += c;
// End char found, break off and attach part
Avoid deeply nested control flow statements. Open
if ( ! block.rules ) {
block.rules = [];
}
Avoid deeply nested control flow statements. Open
for ( ; ++i < l; ) {
c = selector[ i ];
part += c;
if ( c == "\\" ) {
Avoid deeply nested control flow statements. Open
if ( c == seek ) {
break;
}
// Skip over escaped values
else if ( c == "\\" && atrule[ i + 1 ] ) {