rschmukler/agenda

View on GitHub

Showing 81 of 81 total issues

Identical blocks of code found in 6 locations. Consider refactoring.
Open

$(document).ready(function () {
  var currentSectionNav, target;

  // If an anchor hash is in the URL highlight the menu item
  highlightActiveHash();
Severity: Major
Found in docs/agenda/1.0.3/scripts/pagelocation.js and 5 other locations - About 1 day to fix
docs/agenda/2.0.0/scripts/pagelocation.js on lines 3..32
docs/agenda/2.2.0/scripts/pagelocation.js on lines 3..32
docs/agenda/3.1.0/scripts/pagelocation.js on lines 3..32
docs/agenda/4.0.1/scripts/pagelocation.js on lines 3..32
docs/agenda/4.2.0/scripts/pagelocation.js on lines 3..32

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 297.

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

Identical blocks of code found in 6 locations. Consider refactoring.
Open

$(document).ready(function () {
  var currentSectionNav, target;

  // If an anchor hash is in the URL highlight the menu item
  highlightActiveHash();
Severity: Major
Found in docs/agenda/3.1.0/scripts/pagelocation.js and 5 other locations - About 1 day to fix
docs/agenda/1.0.3/scripts/pagelocation.js on lines 3..32
docs/agenda/2.0.0/scripts/pagelocation.js on lines 3..32
docs/agenda/2.2.0/scripts/pagelocation.js on lines 3..32
docs/agenda/4.0.1/scripts/pagelocation.js on lines 3..32
docs/agenda/4.2.0/scripts/pagelocation.js on lines 3..32

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 297.

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

Identical blocks of code found in 6 locations. Consider refactoring.
Open

$(document).ready(function () {
  var currentSectionNav, target;

  // If an anchor hash is in the URL highlight the menu item
  highlightActiveHash();
Severity: Major
Found in docs/agenda/4.0.1/scripts/pagelocation.js and 5 other locations - About 1 day to fix
docs/agenda/1.0.3/scripts/pagelocation.js on lines 3..32
docs/agenda/2.0.0/scripts/pagelocation.js on lines 3..32
docs/agenda/2.2.0/scripts/pagelocation.js on lines 3..32
docs/agenda/3.1.0/scripts/pagelocation.js on lines 3..32
docs/agenda/4.2.0/scripts/pagelocation.js on lines 3..32

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 297.

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

Identical blocks of code found in 6 locations. Consider refactoring.
Open

$(document).ready(function () {
  var currentSectionNav, target;

  // If an anchor hash is in the URL highlight the menu item
  highlightActiveHash();
Severity: Major
Found in docs/agenda/2.0.0/scripts/pagelocation.js and 5 other locations - About 1 day to fix
docs/agenda/1.0.3/scripts/pagelocation.js on lines 3..32
docs/agenda/2.2.0/scripts/pagelocation.js on lines 3..32
docs/agenda/3.1.0/scripts/pagelocation.js on lines 3..32
docs/agenda/4.0.1/scripts/pagelocation.js on lines 3..32
docs/agenda/4.2.0/scripts/pagelocation.js on lines 3..32

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 297.

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

Identical blocks of code found in 6 locations. Consider refactoring.
Open

$(document).ready(function () {
  var currentSectionNav, target;

  // If an anchor hash is in the URL highlight the menu item
  highlightActiveHash();
Severity: Major
Found in docs/agenda/4.2.0/scripts/pagelocation.js and 5 other locations - About 1 day to fix
docs/agenda/1.0.3/scripts/pagelocation.js on lines 3..32
docs/agenda/2.0.0/scripts/pagelocation.js on lines 3..32
docs/agenda/2.2.0/scripts/pagelocation.js on lines 3..32
docs/agenda/3.1.0/scripts/pagelocation.js on lines 3..32
docs/agenda/4.0.1/scripts/pagelocation.js on lines 3..32

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 297.

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

Identical blocks of code found in 6 locations. Consider refactoring.
Open

$(document).ready(function () {
  var currentSectionNav, target;

  // If an anchor hash is in the URL highlight the menu item
  highlightActiveHash();
Severity: Major
Found in docs/agenda/2.2.0/scripts/pagelocation.js and 5 other locations - About 1 day to fix
docs/agenda/1.0.3/scripts/pagelocation.js on lines 3..32
docs/agenda/2.0.0/scripts/pagelocation.js on lines 3..32
docs/agenda/3.1.0/scripts/pagelocation.js on lines 3..32
docs/agenda/4.0.1/scripts/pagelocation.js on lines 3..32
docs/agenda/4.2.0/scripts/pagelocation.js on lines 3..32

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 297.

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

Identical blocks of code found in 4 locations. Consider refactoring.
Open

(function () {
  var lineId, lines, totalLines, anchorHash;
  var source = document.getElementsByClassName('prettyprint source linenums');
  var i = 0;
  var lineNumber = 0;
Severity: Major
Found in docs/agenda/2.2.0/scripts/linenumber.js and 3 other locations - About 1 day to fix
docs/agenda/1.0.3/scripts/linenumber.js on lines 4..24
docs/agenda/2.0.0/scripts/linenumber.js on lines 4..24
docs/agenda/3.1.0/scripts/linenumber.js on lines 4..24

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 196.

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

Identical blocks of code found in 4 locations. Consider refactoring.
Open

(function () {
  var lineId, lines, totalLines, anchorHash;
  var source = document.getElementsByClassName('prettyprint source linenums');
  var i = 0;
  var lineNumber = 0;
Severity: Major
Found in docs/agenda/1.0.3/scripts/linenumber.js and 3 other locations - About 1 day to fix
docs/agenda/2.0.0/scripts/linenumber.js on lines 4..24
docs/agenda/2.2.0/scripts/linenumber.js on lines 4..24
docs/agenda/3.1.0/scripts/linenumber.js on lines 4..24

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 196.

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

Identical blocks of code found in 4 locations. Consider refactoring.
Open

(function () {
  var lineId, lines, totalLines, anchorHash;
  var source = document.getElementsByClassName('prettyprint source linenums');
  var i = 0;
  var lineNumber = 0;
Severity: Major
Found in docs/agenda/2.0.0/scripts/linenumber.js and 3 other locations - About 1 day to fix
docs/agenda/1.0.3/scripts/linenumber.js on lines 4..24
docs/agenda/2.2.0/scripts/linenumber.js on lines 4..24
docs/agenda/3.1.0/scripts/linenumber.js on lines 4..24

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 196.

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

Identical blocks of code found in 4 locations. Consider refactoring.
Open

(function () {
  var lineId, lines, totalLines, anchorHash;
  var source = document.getElementsByClassName('prettyprint source linenums');
  var i = 0;
  var lineNumber = 0;
Severity: Major
Found in docs/agenda/3.1.0/scripts/linenumber.js and 3 other locations - About 1 day to fix
docs/agenda/1.0.3/scripts/linenumber.js on lines 4..24
docs/agenda/2.0.0/scripts/linenumber.js on lines 4..24
docs/agenda/2.2.0/scripts/linenumber.js on lines 4..24

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 196.

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

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

(function () {
  var lineId, lines, totalLines, anchorHash;
  var source = document.getElementsByClassName('prettyprint source linenums');
  var i = 0;
  var lineNumber = 0;
Severity: Major
Found in docs/agenda/4.2.0/scripts/linenumber.js and 1 other location - About 7 hrs to fix
docs/agenda/4.0.1/scripts/linenumber.js on lines 3..23

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 194.

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

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

(function () {
  var lineId, lines, totalLines, anchorHash;
  var source = document.getElementsByClassName('prettyprint source linenums');
  var i = 0;
  var lineNumber = 0;
Severity: Major
Found in docs/agenda/4.0.1/scripts/linenumber.js and 1 other location - About 7 hrs to fix
docs/agenda/4.2.0/scripts/linenumber.js on lines 3..23

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 194.

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

Identical blocks of code found in 6 locations. Consider refactoring.
Open

function highlightActiveHash(event) {
  var oldUrl, oldSubSectionElement;

  // check for and remove old hash active state
  if (event && event.originalEvent.oldURL) {
Severity: Major
Found in docs/agenda/4.2.0/scripts/pagelocation.js and 5 other locations - About 7 hrs to fix
docs/agenda/1.0.3/scripts/pagelocation.js on lines 39..58
docs/agenda/2.0.0/scripts/pagelocation.js on lines 39..58
docs/agenda/2.2.0/scripts/pagelocation.js on lines 39..58
docs/agenda/3.1.0/scripts/pagelocation.js on lines 39..58
docs/agenda/4.0.1/scripts/pagelocation.js on lines 39..58

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 191.

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

Identical blocks of code found in 6 locations. Consider refactoring.
Open

function highlightActiveHash(event) {
  var oldUrl, oldSubSectionElement;

  // check for and remove old hash active state
  if (event && event.originalEvent.oldURL) {
Severity: Major
Found in docs/agenda/3.1.0/scripts/pagelocation.js and 5 other locations - About 7 hrs to fix
docs/agenda/1.0.3/scripts/pagelocation.js on lines 39..58
docs/agenda/2.0.0/scripts/pagelocation.js on lines 39..58
docs/agenda/2.2.0/scripts/pagelocation.js on lines 39..58
docs/agenda/4.0.1/scripts/pagelocation.js on lines 39..58
docs/agenda/4.2.0/scripts/pagelocation.js on lines 39..58

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 191.

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

Identical blocks of code found in 6 locations. Consider refactoring.
Open

function highlightActiveHash(event) {
  var oldUrl, oldSubSectionElement;

  // check for and remove old hash active state
  if (event && event.originalEvent.oldURL) {
Severity: Major
Found in docs/agenda/2.2.0/scripts/pagelocation.js and 5 other locations - About 7 hrs to fix
docs/agenda/1.0.3/scripts/pagelocation.js on lines 39..58
docs/agenda/2.0.0/scripts/pagelocation.js on lines 39..58
docs/agenda/3.1.0/scripts/pagelocation.js on lines 39..58
docs/agenda/4.0.1/scripts/pagelocation.js on lines 39..58
docs/agenda/4.2.0/scripts/pagelocation.js on lines 39..58

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 191.

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

Identical blocks of code found in 6 locations. Consider refactoring.
Open

function highlightActiveHash(event) {
  var oldUrl, oldSubSectionElement;

  // check for and remove old hash active state
  if (event && event.originalEvent.oldURL) {
Severity: Major
Found in docs/agenda/4.0.1/scripts/pagelocation.js and 5 other locations - About 7 hrs to fix
docs/agenda/1.0.3/scripts/pagelocation.js on lines 39..58
docs/agenda/2.0.0/scripts/pagelocation.js on lines 39..58
docs/agenda/2.2.0/scripts/pagelocation.js on lines 39..58
docs/agenda/3.1.0/scripts/pagelocation.js on lines 39..58
docs/agenda/4.2.0/scripts/pagelocation.js on lines 39..58

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 191.

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

Identical blocks of code found in 6 locations. Consider refactoring.
Open

function highlightActiveHash(event) {
  var oldUrl, oldSubSectionElement;

  // check for and remove old hash active state
  if (event && event.originalEvent.oldURL) {
Severity: Major
Found in docs/agenda/2.0.0/scripts/pagelocation.js and 5 other locations - About 7 hrs to fix
docs/agenda/1.0.3/scripts/pagelocation.js on lines 39..58
docs/agenda/2.2.0/scripts/pagelocation.js on lines 39..58
docs/agenda/3.1.0/scripts/pagelocation.js on lines 39..58
docs/agenda/4.0.1/scripts/pagelocation.js on lines 39..58
docs/agenda/4.2.0/scripts/pagelocation.js on lines 39..58

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 191.

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

Identical blocks of code found in 6 locations. Consider refactoring.
Open

function highlightActiveHash(event) {
  var oldUrl, oldSubSectionElement;

  // check for and remove old hash active state
  if (event && event.originalEvent.oldURL) {
Severity: Major
Found in docs/agenda/1.0.3/scripts/pagelocation.js and 5 other locations - About 7 hrs to fix
docs/agenda/2.0.0/scripts/pagelocation.js on lines 39..58
docs/agenda/2.2.0/scripts/pagelocation.js on lines 39..58
docs/agenda/3.1.0/scripts/pagelocation.js on lines 39..58
docs/agenda/4.0.1/scripts/pagelocation.js on lines 39..58
docs/agenda/4.2.0/scripts/pagelocation.js on lines 39..58

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 191.

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 JobProcessor.ts has 463 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import * as debug from 'debug';
import type { IAgendaJobStatus, IAgendaStatus } from './types/AgendaStatus';
import type { IJobDefinition } from './types/JobDefinition';
import type { Agenda, JobWithId } from './index';
import type { IJobParameters } from './types/JobParameters';
Severity: Minor
Found in src/JobProcessor.ts - About 7 hrs to fix

    File index.ts has 387 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { EventEmitter } from 'events';
    import * as debug from 'debug';
    
    import type { Db, Filter, MongoClientOptions, Sort } from 'mongodb';
    import { SortDirection } from 'mongodb';
    Severity: Minor
    Found in src/index.ts - About 5 hrs to fix
      Severity
      Category
      Status
      Source
      Language