wildhaber/tracky

View on GitHub

Showing 178 of 178 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

var TrackyOrientation = function (_TrackyEvent) {
  _inherits(TrackyOrientation, _TrackyEvent);

  function TrackyOrientation() {
    _classCallCheck(this, TrackyOrientation);
Severity: Major
Found in dist/tracky.js and 1 other location - About 1 mo to fix
dist/node/tracky.orientation.js on lines 27..587

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 5829.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

var TrackyOrientation = function (_TrackyEvent) {
  _inherits(TrackyOrientation, _TrackyEvent);

  function TrackyOrientation() {
    _classCallCheck(this, TrackyOrientation);
Severity: Major
Found in dist/node/tracky.orientation.js and 1 other location - About 1 mo to fix
dist/tracky.js on lines 1374..1934

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 5829.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

var TrackyEdge = function (_TrackyEvent) {
  _inherits(TrackyEdge, _TrackyEvent);

  function TrackyEdge() {
    _classCallCheck(this, TrackyEdge);
Severity: Major
Found in dist/node/tracky.edge.js and 1 other location - About 1 mo to fix
dist/tracky.js on lines 28..520

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 5613.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

var TrackyEdge = function (_TrackyEvent) {
  _inherits(TrackyEdge, _TrackyEvent);

  function TrackyEdge() {
    _classCallCheck(this, TrackyEdge);
Severity: Major
Found in dist/tracky.js and 1 other location - About 1 mo to fix
dist/node/tracky.edge.js on lines 27..519

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 5613.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

var TrackyScroll = function (_TrackyEvent) {
  _inherits(TrackyScroll, _TrackyEvent);

  function TrackyScroll() {
    _classCallCheck(this, TrackyScroll);
Severity: Major
Found in dist/tracky.js and 1 other location - About 3 wks to fix
dist/node/tracky.scroll.js on lines 23..483

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 3957.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

var TrackyScroll = function (_TrackyEvent) {
  _inherits(TrackyScroll, _TrackyEvent);

  function TrackyScroll() {
    _classCallCheck(this, TrackyScroll);
Severity: Major
Found in dist/node/tracky.scroll.js and 1 other location - About 3 wks to fix
dist/tracky.js on lines 1960..2420

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 3957.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

var Tracky = function () {
  function Tracky() {
    var selector = arguments.length <= 0 || arguments[0] === undefined ? 'body' : arguments[0];
    var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];

Severity: Major
Found in dist/tracky.js and 1 other location - About 2 wks to fix
dist/node/tracky.js on lines 33..416

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 2642.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

var Tracky = function () {
  function Tracky() {
    var selector = arguments.length <= 0 || arguments[0] === undefined ? 'body' : arguments[0];
    var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];

Severity: Major
Found in dist/node/tracky.js and 1 other location - About 2 wks to fix
dist/tracky.js on lines 932..1315

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 2642.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

var TrackyEvent = function () {

  /**
   * constructor
   * @param eventKey
Severity: Major
Found in dist/node/tracky.event.js and 1 other location - About 2 wks to fix
dist/tracky.js on lines 536..896

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 2525.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

var TrackyEvent = function () {

  /**
   * constructor
   * @param eventKey
Severity: Major
Found in dist/tracky.js and 1 other location - About 2 wks to fix
dist/node/tracky.event.js on lines 13..373

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 2525.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

File tracky.js has 1771 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Tracky = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
Severity: Major
Found in dist/tracky.js - About 4 days to fix

    Function TrackyOrientation has a Cognitive Complexity of 155 (exceeds 5 allowed). Consider refactoring.
    Open

    var TrackyOrientation = function (_TrackyEvent) {
      _inherits(TrackyOrientation, _TrackyEvent);
    
      function TrackyOrientation() {
        _classCallCheck(this, TrackyOrientation);
    Severity: Minor
    Found in dist/node/tracky.orientation.js - About 3 days 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 TrackyEdge has a Cognitive Complexity of 149 (exceeds 5 allowed). Consider refactoring.
    Open

    var TrackyEdge = function (_TrackyEvent) {
      _inherits(TrackyEdge, _TrackyEvent);
    
      function TrackyEdge() {
        _classCallCheck(this, TrackyEdge);
    Severity: Minor
    Found in dist/node/tracky.edge.js - About 3 days 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 TrackyScroll has a Cognitive Complexity of 105 (exceeds 5 allowed). Consider refactoring.
    Open

    var TrackyScroll = function (_TrackyEvent) {
      _inherits(TrackyScroll, _TrackyEvent);
    
      function TrackyScroll() {
        _classCallCheck(this, TrackyScroll);
    Severity: Minor
    Found in dist/node/tracky.scroll.js - About 2 days 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 5 has 395 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{}],5:[function(require,module,exports){
    'use strict';
    
    Object.defineProperty(exports, "__esModule", {
      value: true
    Severity: Major
    Found in dist/tracky.js - About 1 day to fix

      Function TrackyOrientation has 379 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var TrackyOrientation = function (_TrackyEvent) {
        _inherits(TrackyOrientation, _TrackyEvent);
      
        function TrackyOrientation() {
          _classCallCheck(this, TrackyOrientation);
      Severity: Major
      Found in dist/tracky.js - About 1 day to fix

        Function TrackyOrientation has 379 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var TrackyOrientation = function (_TrackyEvent) {
          _inherits(TrackyOrientation, _TrackyEvent);
        
          function TrackyOrientation() {
            _classCallCheck(this, TrackyOrientation);
        Severity: Major
        Found in dist/node/tracky.orientation.js - About 1 day to fix

          Function 1 has 353 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Tracky = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
          'use strict';
          
          Object.defineProperty(exports, "__esModule", {
            value: true
          Severity: Major
          Found in dist/tracky.js - About 1 day to fix

            Function TrackyEdge has 337 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var TrackyEdge = function (_TrackyEvent) {
              _inherits(TrackyEdge, _TrackyEvent);
            
              function TrackyEdge() {
                _classCallCheck(this, TrackyEdge);
            Severity: Major
            Found in dist/node/tracky.edge.js - About 1 day to fix

              Function TrackyEdge has 337 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var TrackyEdge = function (_TrackyEvent) {
                _inherits(TrackyEdge, _TrackyEvent);
              
                function TrackyEdge() {
                  _classCallCheck(this, TrackyEdge);
              Severity: Major
              Found in dist/tracky.js - About 1 day to fix
                Severity
                Category
                Status
                Source
                Language