Showing 12 of 22 total issues
Function collect
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Collector.prototype.collect = function(directory, depth, include, exclude) {
var excludes, files, includes;
files = wrench.readdirSyncRecursive(directory);
if (!include) {
include = "*";
Method complex
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function complex($v1, $v2)
{
$v3 = $v1 / ($v2 + $v1);
if ($v3 > 14)
{
Method div
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function div($v1, $v2)
{
$v3 = $v1 / ($v2 + $v1);
if ($v3 > 14)
{
Function div
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Math.prototype.div = function (v1, v2)
{
v3 = v1 / (v2 + v1);
if (v3 > 14)
{
Function complex
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Math.prototype.complex = function (v1, v2)
{
v3 = v1 / (v2 + v1);
if (v3 > 14)
{
Function analyze
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Parser.prototype.analyze = function(result, file, stack, tokens, lines) {
var f, firstHash, firstLine, firstToken, hash, i, sig, tokenPos;
sig = '';
tokenPos = [];
_.forEach(stack, function(token, i) {
Function recursiveRuleParser
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ParseCSS.prototype.recursiveRuleParser = function(rules, scope, fuzzy) {
_.forEach(rules, (function(_this) {
return function(rule) {
if (rule.rules != null) {
return _this.recursiveRuleParser(rule.rules, rule.type + " ", fuzzy);
Function addClone
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Parser.prototype.addClone = function(result, file, tokenPos, lines, tokens, i, firstToken, firstLine, firstHash) {
Function complex
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
public function complex($v1, $v2)
{
$v3 = $v1 / ($v2 + $v1);
if ($v3 > 14)
{
- 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 div
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
public function div($v1, $v2)
{
$v3 = $v1 / ($v2 + $v1);
if ($v3 > 14)
{
- 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 analyze
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Parser.prototype.analyze = function(result, file, stack, tokens, lines) {
Function parse
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Parser.prototype.parse = function(result, file, tokens, lines, fuzzy) {