codenothing/Nlint

View on GitHub

Showing 26 of 26 total issues

Function render has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    render: function( path, contents, settings, callback ) {
        var errors = [],
            checker = new JSCS(),
            results = [],
            lines = contents.trim().split( rnewline ),
Severity: Minor
Found in lib/linters/jscs.js - About 45 mins to fix

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 finished has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    finished: function( e ) {
        var self = this,
            passed = false,
            warn = false,
            error = false;
Severity: Minor
Found in lib/Render.js - About 35 mins to fix

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 Nlint has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function Nlint( files, options, callback ) {
    var self = this;

    // Force Nlint instance
    if ( ! ( self instanceof Nlint ) ) {
Severity: Minor
Found in lib/Nlint.js - About 35 mins to fix

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 _runLint has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    _runLint: function( result, settings, linter, callback ){
        var self = this,

            // We have to create a copy of the options used for each linter in case
            // the linter itself alters the options
Severity: Minor
Found in lib/Nlint.js - About 25 mins to fix

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 isMatch has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    isMatch: function( path, settings, nlint ) {
        var self = this;

        return ( self.isDirectory && path.indexOf( self.match ) === 0 ) ||
            ( self.isString && path === self.match ) ||
Severity: Minor
Found in lib/MatchPath.js - About 25 mins to fix

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 MatchPath has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function MatchPath( match, root ) {
    var self = this;

    // Force MatchPath instance
    if ( ! ( self instanceof MatchPath ) ) {
Severity: Minor
Found in lib/MatchPath.js - About 25 mins to fix

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

Severity
Category
Status
Source
Language