Showing 171 of 259 total issues
Function importantToken
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
importantToken: function(first, startLine, startCol){
var reader = this._reader,
important = first,
tt = Tokens.CHAR,
temp,
Function _keyframes
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_keyframes: function(){
/*
* keyframes:
* : KEYFRAMES_SYM S* keyframe_name S* '{' S* keyframe_rule* '}' {
Function multiProperty
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
multiProperty: function (types, expression, comma, max) {
var result = false,
value = expression.value,
count = 0,
Function substyle
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function substyle() {
var v;
for (;;) {
if (nexttoken.id === '}' || nexttoken.id === '(end)' ||
xquote && nexttoken.id === xquote) {
Function _negation_arg
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_negation_arg: function(){
/*
* negation_arg
* : type_selector | universal | HASH | class | attrib | pseudo
* ;
Function init
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init: function(parser, reporter){
var rule = this,
gradients;
parser.addListener("startrule", function(){
Function jsonObject
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function jsonObject() {
var o = {}, t = nexttoken;
advance('{');
if (nexttoken.id !== '}') {
for (;;) {
Function groupProperty
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
groupProperty: function (types, expression, comma) {
var result = false,
value = expression.value,
typeCount = types.split("||").length,
Function _media
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_media: function(){
/*
* media
* : MEDIA_SYM S* media_query_list S* '{' S* ruleset* '}' S*
* ;
Function _function
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_function: function(){
/*
* function
* : FUNCTION S* expr ')' S*
Function _page
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_page: function(){
/*
* page:
* PAGE_SYM S* IDENT? pseudo_page? S*
* '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S*
Function init
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init: function(parser, reporter){
var rule = this,
count = 0,
fontFaceRule = false,
firstSrc = true,
Function formatResults
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
formatResults: function(results, filename, options) {
var messages = results.messages,
output = [],
tests = {
Function block
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function block(f) {
var a, b = inblock, old_indent = indent, s = scope, t;
inblock = f;
scope = Object.create(scope);
nonadjacent(token, nexttoken);
Method to_s
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
def to_s
result = message.to_s
unless empty? file
result = "#{result}#{"\n" unless empty?(result)}#{file}"
result = "#{result}:#{line}" unless empty? line
- 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 border-image-slice
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
"border-image-slice" : function(expression) {
var valid = false,
numeric = "<number> | <percentage>",
fill = false,
Function init
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init: function(parser, reporter){
var rule = this;
parser.addListener("startrule", function(event){
var selectors = event.selectors,
selector,
Function updateValues
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function updateValues(part){
var i, j, len, num,
elementName = part.elementName ? part.elementName.text : "",
modifier;
Function _ie_function
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_ie_function: function(){
/* (My own extension)
* ie_function
* : IE_FUNCTION S* IDENT '=' term [S* ','? IDENT '=' term]+ ')' S*
Function validate
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
validate: function(property, value){
//normalize name
var name = property.toString().toLowerCase(),
parts = value.parts,