historyforge/historyforge

View on GitHub

Showing 216 of 347 total issues

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

            }, d = {}.hasOwnProperty, f = [].indexOf || function(t3) {
              for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                if (e2 in this && this[e2] === t3)
                  return e2;
              return -1;
Severity: Major
Found in app/assets/builds/richtext.js and 10 other locations - About 2 hrs to fix
app/assets/builds/richtext.js on lines 907..912
app/assets/builds/richtext.js on lines 1554..1559
app/assets/builds/richtext.js on lines 1683..1688
app/assets/builds/richtext.js on lines 1875..1880
app/assets/builds/richtext.js on lines 2087..2092
app/assets/builds/richtext.js on lines 3480..3485
app/assets/builds/richtext.js on lines 3632..3637
app/assets/builds/richtext.js on lines 3896..3901
app/assets/builds/richtext.js on lines 4850..4855
app/assets/builds/richtext.js on lines 5193..5198

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

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

            }, s = {}.hasOwnProperty, a = [].indexOf || function(t3) {
              for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                if (e2 in this && this[e2] === t3)
                  return e2;
              return -1;
Severity: Major
Found in app/assets/builds/richtext.js and 10 other locations - About 2 hrs to fix
app/assets/builds/richtext.js on lines 907..912
app/assets/builds/richtext.js on lines 1554..1559
app/assets/builds/richtext.js on lines 1683..1688
app/assets/builds/richtext.js on lines 1875..1880
app/assets/builds/richtext.js on lines 3480..3485
app/assets/builds/richtext.js on lines 3632..3637
app/assets/builds/richtext.js on lines 3698..3703
app/assets/builds/richtext.js on lines 3896..3901
app/assets/builds/richtext.js on lines 4850..4855
app/assets/builds/richtext.js on lines 5193..5198

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

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

            }, c = {}.hasOwnProperty, l = [].indexOf || function(t3) {
              for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                if (e2 in this && this[e2] === t3)
                  return e2;
              return -1;
Severity: Major
Found in app/assets/builds/richtext.js and 10 other locations - About 2 hrs to fix
app/assets/builds/richtext.js on lines 907..912
app/assets/builds/richtext.js on lines 1554..1559
app/assets/builds/richtext.js on lines 1875..1880
app/assets/builds/richtext.js on lines 2087..2092
app/assets/builds/richtext.js on lines 3480..3485
app/assets/builds/richtext.js on lines 3632..3637
app/assets/builds/richtext.js on lines 3698..3703
app/assets/builds/richtext.js on lines 3896..3901
app/assets/builds/richtext.js on lines 4850..4855
app/assets/builds/richtext.js on lines 5193..5198

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

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

            }, a = {}.hasOwnProperty, u = [].indexOf || function(t3) {
              for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                if (e2 in this && this[e2] === t3)
                  return e2;
              return -1;
Severity: Major
Found in app/assets/builds/richtext.js and 10 other locations - About 2 hrs to fix
app/assets/builds/richtext.js on lines 907..912
app/assets/builds/richtext.js on lines 1554..1559
app/assets/builds/richtext.js on lines 1683..1688
app/assets/builds/richtext.js on lines 1875..1880
app/assets/builds/richtext.js on lines 2087..2092
app/assets/builds/richtext.js on lines 3632..3637
app/assets/builds/richtext.js on lines 3698..3703
app/assets/builds/richtext.js on lines 3896..3901
app/assets/builds/richtext.js on lines 4850..4855
app/assets/builds/richtext.js on lines 5193..5198

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

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

            }, n = {}.hasOwnProperty, i = [].indexOf || function(t3) {
              for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                if (e2 in this && this[e2] === t3)
                  return e2;
              return -1;
Severity: Major
Found in app/assets/builds/richtext.js and 10 other locations - About 2 hrs to fix
app/assets/builds/richtext.js on lines 907..912
app/assets/builds/richtext.js on lines 1683..1688
app/assets/builds/richtext.js on lines 1875..1880
app/assets/builds/richtext.js on lines 2087..2092
app/assets/builds/richtext.js on lines 3480..3485
app/assets/builds/richtext.js on lines 3632..3637
app/assets/builds/richtext.js on lines 3698..3703
app/assets/builds/richtext.js on lines 3896..3901
app/assets/builds/richtext.js on lines 4850..4855
app/assets/builds/richtext.js on lines 5193..5198

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

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

              }, u.prototype.toolbarDidRemoveAttribute = function(t3) {
                return this.recordFormattingUndoEntry(t3), this.composition.removeCurrentAttribute(t3), this.render(), this.selectionFrozen ? void 0 : this.editorElement.focus();
              }, u.prototype.toolbarWillShowDialog = function() {
Severity: Major
Found in app/assets/builds/richtext.js and 1 other location - About 2 hrs to fix
app/assets/builds/richtext.js on lines 5090..5092

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

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

            var t2, n, i, o, r, s = [].indexOf || function(t3) {
              for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                if (e2 in this && this[e2] === t3)
                  return e2;
              return -1;
Severity: Major
Found in app/assets/builds/richtext.js and 10 other locations - About 2 hrs to fix
app/assets/builds/richtext.js on lines 1554..1559
app/assets/builds/richtext.js on lines 1683..1688
app/assets/builds/richtext.js on lines 1875..1880
app/assets/builds/richtext.js on lines 2087..2092
app/assets/builds/richtext.js on lines 3480..3485
app/assets/builds/richtext.js on lines 3632..3637
app/assets/builds/richtext.js on lines 3698..3703
app/assets/builds/richtext.js on lines 3896..3901
app/assets/builds/richtext.js on lines 4850..4855
app/assets/builds/richtext.js on lines 5193..5198

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

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

            }, o = {}.hasOwnProperty, r = [].indexOf || function(t3) {
              for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                if (e2 in this && this[e2] === t3)
                  return e2;
              return -1;
Severity: Major
Found in app/assets/builds/richtext.js and 10 other locations - About 2 hrs to fix
app/assets/builds/richtext.js on lines 907..912
app/assets/builds/richtext.js on lines 1554..1559
app/assets/builds/richtext.js on lines 1683..1688
app/assets/builds/richtext.js on lines 1875..1880
app/assets/builds/richtext.js on lines 2087..2092
app/assets/builds/richtext.js on lines 3480..3485
app/assets/builds/richtext.js on lines 3632..3637
app/assets/builds/richtext.js on lines 3698..3703
app/assets/builds/richtext.js on lines 3896..3901
app/assets/builds/richtext.js on lines 5193..5198

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

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

            }, r = {}.hasOwnProperty, s = [].indexOf || function(t3) {
              for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                if (e2 in this && this[e2] === t3)
                  return e2;
              return -1;
Severity: Major
Found in app/assets/builds/richtext.js and 10 other locations - About 2 hrs to fix
app/assets/builds/richtext.js on lines 907..912
app/assets/builds/richtext.js on lines 1554..1559
app/assets/builds/richtext.js on lines 1683..1688
app/assets/builds/richtext.js on lines 1875..1880
app/assets/builds/richtext.js on lines 2087..2092
app/assets/builds/richtext.js on lines 3480..3485
app/assets/builds/richtext.js on lines 3698..3703
app/assets/builds/richtext.js on lines 3896..3901
app/assets/builds/richtext.js on lines 4850..4855
app/assets/builds/richtext.js on lines 5193..5198

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

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

              }, u.prototype.toolbarDidToggleAttribute = function(t3) {
                return this.recordFormattingUndoEntry(t3), this.composition.toggleCurrentAttribute(t3), this.render(), this.selectionFrozen ? void 0 : this.editorElement.focus();
              }, u.prototype.toolbarDidUpdateAttribute = function(t3, e2) {
Severity: Major
Found in app/assets/builds/richtext.js and 1 other location - About 2 hrs to fix
app/assets/builds/richtext.js on lines 5094..5096

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

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

            var t2, n, i, o, r, s, a, u = [].indexOf || function(t3) {
              for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                if (e2 in this && this[e2] === t3)
                  return e2;
              return -1;
Severity: Major
Found in app/assets/builds/richtext.js and 10 other locations - About 2 hrs to fix
app/assets/builds/richtext.js on lines 907..912
app/assets/builds/richtext.js on lines 1554..1559
app/assets/builds/richtext.js on lines 1683..1688
app/assets/builds/richtext.js on lines 1875..1880
app/assets/builds/richtext.js on lines 2087..2092
app/assets/builds/richtext.js on lines 3480..3485
app/assets/builds/richtext.js on lines 3632..3637
app/assets/builds/richtext.js on lines 3698..3703
app/assets/builds/richtext.js on lines 3896..3901
app/assets/builds/richtext.js on lines 4850..4855

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

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

            }, s = {}.hasOwnProperty, a = [].slice, u = [].indexOf || function(t3) {
              for (var e2 = 0, n2 = this.length; n2 > e2; e2++)
                if (e2 in this && this[e2] === t3)
                  return e2;
              return -1;
Severity: Major
Found in app/assets/builds/richtext.js and 10 other locations - About 2 hrs to fix
app/assets/builds/richtext.js on lines 907..912
app/assets/builds/richtext.js on lines 1554..1559
app/assets/builds/richtext.js on lines 1683..1688
app/assets/builds/richtext.js on lines 1875..1880
app/assets/builds/richtext.js on lines 2087..2092
app/assets/builds/richtext.js on lines 3480..3485
app/assets/builds/richtext.js on lines 3632..3637
app/assets/builds/richtext.js on lines 3698..3703
app/assets/builds/richtext.js on lines 4850..4855
app/assets/builds/richtext.js on lines 5193..5198

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

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 (t3 == null && (t3 = []), this.managedAttachments = {}, n3 = 0, i2 = t3.length; i2 > n3; n3++)
                  e2 = t3[n3], this.manageAttachment(e2);
Severity: Major
Found in app/assets/builds/richtext.js and 1 other location - About 2 hrs to fix
app/assets/builds/richtext.js on lines 1325..1326

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

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 (t3 == null && (t3 = []), this.elements = {}, n = 0, i = t3.length; i > n; n++)
                  e3 = t3[n], this.add(e3);
Severity: Major
Found in app/assets/builds/richtext.js and 1 other location - About 2 hrs to fix
app/assets/builds/richtext.js on lines 4708..4709

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

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 (i3 = this.objects, o2 = [], e3 = 0, n2 = i3.length; n2 > e3; e3++)
                    t3 = i3[e3], o2.push(t3.inspect());
Severity: Major
Found in app/assets/builds/richtext.js and 1 other location - About 1 hr to fix
app/assets/builds/richtext.js on lines 4877..4878

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

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 (n2 = this.selectionManagers, i2 = [], t3 = 0, e3 = n2.length; e3 > t3; t3++)
                  o3 = n2[t3], i2.push(o3.selectionDidChange());
Severity: Major
Found in app/assets/builds/richtext.js and 1 other location - About 1 hr to fix
app/assets/builds/richtext.js on lines 3291..3292

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

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

              }, left: function(t3) {
                var e2;
                return this.selectionIsInCursorTarget() ? (t3.preventDefault(), (e2 = this.responder) != null ? e2.moveCursorInDirection("backward") : void 0) : void 0;
              }, right: function(t3) {
Severity: Major
Found in app/assets/builds/richtext.js and 1 other location - About 1 hr to fix
app/assets/builds/richtext.js on lines 1980..1983

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

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

              }, right: function(t3) {
                var e2;
                return this.selectionIsInCursorTarget() ? (t3.preventDefault(), (e2 = this.responder) != null ? e2.moveCursorInDirection("forward") : void 0) : void 0;
              }, control: { d: function(t3) {
Severity: Major
Found in app/assets/builds/richtext.js and 1 other location - About 1 hr to fix
app/assets/builds/richtext.js on lines 1977..1980

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

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

addEventListener('direct-upload:end', event => {
  const { id } = event.detail
  const element = document.getElementById(`direct-upload-${id}`)
  element.classList.add('direct-upload--complete')
})
Severity: Major
Found in app/javascript/cms.js and 1 other location - About 1 hr to fix
app/javascript/cms.js on lines 56..60

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

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

addEventListener('direct-upload:start', event => {
  const { id } = event.detail
  const element = document.getElementById(`direct-upload-${id}`)
  element.classList.remove('direct-upload--pending')
})
Severity: Major
Found in app/javascript/cms.js and 1 other location - About 1 hr to fix
app/javascript/cms.js on lines 76..80

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

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