phodal/congee

View on GitHub

Showing 221 of 421 total issues

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

(function ( $ ) {

    var localization = $.spectrum.localization["zh-cn"] = {
        cancelText: "取消",
        chooseText: "选择",
Severity: Major
Found in scripts/spectrum/i18n/jquery.spectrum-zh-cn.js and 10 other locations - About 3 hrs to fix
scripts/spectrum/i18n/jquery.spectrum-ar.js on lines 4..17
scripts/spectrum/i18n/jquery.spectrum-de.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-es.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-fr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-gr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-he.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-hr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-pl.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-pt-br.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-zh-tw.js on lines 5..18

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

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 11 locations. Consider refactoring.
Open

(function ( $ ) {

    var localization = $.spectrum.localization["fr"] = {
        cancelText: "Annuler",
        chooseText: "Valider",
Severity: Major
Found in scripts/spectrum/i18n/jquery.spectrum-fr.js and 10 other locations - About 3 hrs to fix
scripts/spectrum/i18n/jquery.spectrum-ar.js on lines 4..17
scripts/spectrum/i18n/jquery.spectrum-de.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-es.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-gr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-he.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-hr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-pl.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-pt-br.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-zh-cn.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-zh-tw.js on lines 5..18

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

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 11 locations. Consider refactoring.
Open

(function ( $ ) {

    var localization = $.spectrum.localization["zh-tw"] = {
        cancelText: "取消",
        chooseText: "選擇",
Severity: Major
Found in scripts/spectrum/i18n/jquery.spectrum-zh-tw.js and 10 other locations - About 3 hrs to fix
scripts/spectrum/i18n/jquery.spectrum-ar.js on lines 4..17
scripts/spectrum/i18n/jquery.spectrum-de.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-es.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-fr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-gr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-he.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-hr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-pl.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-pt-br.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-zh-cn.js on lines 5..18

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

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 11 locations. Consider refactoring.
Open

(function ( $ ) {

    var localization = $.spectrum.localization["pl"] = {
        cancelText: "Anuluj",
        chooseText: "Wybierz",
Severity: Major
Found in scripts/spectrum/i18n/jquery.spectrum-pl.js and 10 other locations - About 3 hrs to fix
scripts/spectrum/i18n/jquery.spectrum-ar.js on lines 4..17
scripts/spectrum/i18n/jquery.spectrum-de.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-es.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-fr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-gr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-he.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-hr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-pt-br.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-zh-cn.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-zh-tw.js on lines 5..18

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

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 11 locations. Consider refactoring.
Open

(function ( $ ) {

var localization = $.spectrum.localization["ar"] = {
    cancelText: "إلغاء",
    chooseText: "إختار",
Severity: Major
Found in scripts/spectrum/i18n/jquery.spectrum-ar.js and 10 other locations - About 3 hrs to fix
scripts/spectrum/i18n/jquery.spectrum-de.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-es.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-fr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-gr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-he.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-hr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-pl.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-pt-br.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-zh-cn.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-zh-tw.js on lines 5..18

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

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 11 locations. Consider refactoring.
Open

(function ( $ ) {

    var localization = $.spectrum.localization["gr"] = {
        cancelText: "Ακύρωση",
        chooseText: "Επιλογή",
Severity: Major
Found in scripts/spectrum/i18n/jquery.spectrum-gr.js and 10 other locations - About 3 hrs to fix
scripts/spectrum/i18n/jquery.spectrum-ar.js on lines 4..17
scripts/spectrum/i18n/jquery.spectrum-de.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-es.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-fr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-he.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-hr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-pl.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-pt-br.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-zh-cn.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-zh-tw.js on lines 5..18

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

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 11 locations. Consider refactoring.
Open

(function ( $ ) {

    var localization = $.spectrum.localization["es"] = {
        cancelText: "Cancelar",
        chooseText: "Elegir",
Severity: Major
Found in scripts/spectrum/i18n/jquery.spectrum-es.js and 10 other locations - About 3 hrs to fix
scripts/spectrum/i18n/jquery.spectrum-ar.js on lines 4..17
scripts/spectrum/i18n/jquery.spectrum-de.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-fr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-gr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-he.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-hr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-pl.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-pt-br.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-zh-cn.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-zh-tw.js on lines 5..18

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

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 11 locations. Consider refactoring.
Open

(function ( $ ) {

    var localization = $.spectrum.localization["pt-br"] = {
        cancelText: "Cancelar",
        chooseText: "Escolher",
Severity: Major
Found in scripts/spectrum/i18n/jquery.spectrum-pt-br.js and 10 other locations - About 3 hrs to fix
scripts/spectrum/i18n/jquery.spectrum-ar.js on lines 4..17
scripts/spectrum/i18n/jquery.spectrum-de.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-es.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-fr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-gr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-he.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-hr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-pl.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-zh-cn.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-zh-tw.js on lines 5..18

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

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 11 locations. Consider refactoring.
Open

(function ( $ ) {

    var localization = $.spectrum.localization["he"] = {
        cancelText: "בטל בחירה",
        chooseText: "בחר צבע",
Severity: Major
Found in scripts/spectrum/i18n/jquery.spectrum-he.js and 10 other locations - About 3 hrs to fix
scripts/spectrum/i18n/jquery.spectrum-ar.js on lines 4..17
scripts/spectrum/i18n/jquery.spectrum-de.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-es.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-fr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-gr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-hr.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-pl.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-pt-br.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-zh-cn.js on lines 5..18
scripts/spectrum/i18n/jquery.spectrum-zh-tw.js on lines 5..18

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

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

  for ( var i = 0; i < n.length; i++ ) {
    if ( ns[ n[i] ] == null )
      ns[ n[i] ] = { rows: new Array(), o: null };
    ns[ n[i] ].rows.push( i );
  }
Severity: Major
Found in ckeditor/plugins/autosave/js/jsdiff.js and 1 other location - About 3 hrs to fix
ckeditor/plugins/autosave/js/jsdiff.js on lines 130..134

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

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

  for ( var i = 0; i < o.length; i++ ) {
    if ( os[ o[i] ] == null )
      os[ o[i] ] = { rows: new Array(), n: null };
    os[ o[i] ].rows.push( i );
  }
Severity: Major
Found in ckeditor/plugins/autosave/js/jsdiff.js and 1 other location - About 3 hrs to fix
ckeditor/plugins/autosave/js/jsdiff.js on lines 124..128

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

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

    if (cap = this.rules.strong.exec(src)) {
      src = src.substring(cap[0].length);
      out += this.renderer.strong(this.output(cap[2] || cap[1]));
      continue;
    }
Severity: Major
Found in ckeditor/plugins/markdown/js/marked.js and 1 other location - About 2 hrs to fix
ckeditor/plugins/markdown/js/marked.js on lines 651..655

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

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

    if (cap = this.rules.em.exec(src)) {
      src = src.substring(cap[0].length);
      out += this.renderer.em(this.output(cap[2] || cap[1]));
      continue;
    }
Severity: Major
Found in ckeditor/plugins/markdown/js/marked.js and 1 other location - About 2 hrs to fix
ckeditor/plugins/markdown/js/marked.js on lines 644..648

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

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

      if (out.o[i].text != null) {
          os += escape_jsdiff(out.o[i].text) + oSpace[i];
      } else {
          os += "<del>" + escape_jsdiff(out.o[i]) + oSpace[i] + "</del>";
      }
Severity: Major
Found in ckeditor/plugins/autosave/js/jsdiff.js and 1 other location - About 2 hrs to fix
ckeditor/plugins/autosave/js/jsdiff.js on lines 110..114

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

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

      if (out.n[i].text != null) {
          ns += escape_jsdiff(out.n[i].text) + nSpace[i];
      } else {
          ns += "<ins>" + escape_jsdiff(out.n[i]) + nSpace[i] + "</ins>";
      }
Severity: Major
Found in ckeditor/plugins/autosave/js/jsdiff.js and 1 other location - About 2 hrs to fix
ckeditor/plugins/autosave/js/jsdiff.js on lines 101..105

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

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

      item = {
        type: 'table',
        header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */),
        align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
        cells: cap[3].replace(/(?: *\| *)?\n$/, '').split('\n')
Severity: Major
Found in ckeditor/plugins/markdown/js/marked.js and 1 other location - About 2 hrs to fix
ckeditor/plugins/markdown/js/marked.js on lines 211..216

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

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

      item = {
        type: 'table',
        header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */),
        align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
        cells: cap[3].replace(/\n$/, '').split('\n')
Severity: Major
Found in ckeditor/plugins/markdown/js/marked.js and 1 other location - About 2 hrs to fix
ckeditor/plugins/markdown/js/marked.js on lines 382..387

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

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

    function lighten (color, amount) {
        amount = (amount === 0) ? 0 : (amount || 10);
        var hsl = tinycolor(color).toHsl();
        hsl.l += amount / 100;
        hsl.l = clamp01(hsl.l);
Severity: Major
Found in scripts/spectrum/spectrum.js and 1 other location - About 2 hrs to fix
scripts/spectrum/spectrum.js on lines 1741..1747

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

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

    function saturate(color, amount) {
        amount = (amount === 0) ? 0 : (amount || 10);
        var hsl = tinycolor(color).toHsl();
        hsl.s += amount / 100;
        hsl.s = clamp01(hsl.s);
Severity: Major
Found in scripts/spectrum/spectrum.js and 1 other location - About 2 hrs to fix
scripts/spectrum/spectrum.js on lines 1753..1759

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

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

    function to (time, withoutSuffix) {
        if (!this.isValid()) {
            return this.localeData().invalidDate();
        }
        return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
Severity: Major
Found in ckeditor/plugins/autosave/js/moment.js and 1 other location - About 2 hrs to fix
ckeditor/plugins/autosave/js/moment.js on lines 1954..1959

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

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

Severity
Category
Status
Source
Language