alykoshin/mini-csv

View on GitHub

Showing 6 of 6 total issues

Function Parse has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring.
Open

var Parse = function(options) {
  var self = this;
  EventEmitter.call(this);

  options            = options || {};
Severity: Minor
Found in lib/index.js - About 1 day 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 Stringify has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
Open

var Stringify = function(options) {
  var self = this;
  EventEmitter.call(this);

  options             = options || {};
Severity: Minor
Found in lib/index.js - About 6 hrs 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 Parse has 130 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var Parse = function(options) {
  var self = this;
  EventEmitter.call(this);

  options            = options || {};
Severity: Major
Found in lib/index.js - About 5 hrs to fix

    Function Stringify has 91 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var Stringify = function(options) {
      var self = this;
      EventEmitter.call(this);
    
      options             = options || {};
    Severity: Major
    Found in lib/index.js - About 3 hrs to fix

      Function parse has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        self.parse = function (text, columns, opt) {
          opt = opt || {};
          //opt = opt || {};
          //_.defaults(opt, options);
          var o = deepAssign({}, options, opt);
      Severity: Minor
      Found in lib/index.js - About 1 hr to fix

        Function _value has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          self._value = function (value, opt) {
            //var o = opt || {};
            //_defaults(opt, options);
            var o = deepAssign({}, options, opt);
            var res;
        Severity: Minor
        Found in lib/index.js - About 1 hr to fix
          Severity
          Category
          Status
          Source
          Language