newscoop/JS-Scoopwriter

View on GitHub

Showing 221 of 221 total issues

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

  $.fn.alert.noConflict = function () {
    $.fn.alert = old
    return this
  }
Severity: Major
Found in app/scripts/bootstrap.min.js and 8 other locations - About 40 mins to fix
app/scripts/bootstrap.min.js on lines 259..262
app/scripts/bootstrap.min.js on lines 461..464
app/scripts/bootstrap.min.js on lines 645..648
app/scripts/bootstrap.min.js on lines 813..816
app/scripts/bootstrap.min.js on lines 1047..1050
app/scripts/bootstrap.min.js on lines 1723..1726
app/scripts/bootstrap.min.js on lines 1861..1864
app/scripts/bootstrap.min.js on lines 1979..1982

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

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

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

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

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

Refactorings

Further Reading

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

                var snippetsGeneric = {
                    1: snippetGenerator(1, 'Generic'),
                    2: snippetGenerator(2, 'Generic'),
                    3: snippetGenerator(3, 'Generic'),
                    4: snippetGenerator(4, 'Generic')
Severity: Minor
Found in app/scripts/httpBackendStub.js and 1 other location - About 40 mins to fix
app/scripts/httpBackendStub.js on lines 57..62

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

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

  $.fn.carousel.noConflict = function () {
    $.fn.carousel = old
    return this
  }
Severity: Major
Found in app/scripts/bootstrap.min.js and 8 other locations - About 40 mins to fix
app/scripts/bootstrap.min.js on lines 154..157
app/scripts/bootstrap.min.js on lines 259..262
app/scripts/bootstrap.min.js on lines 645..648
app/scripts/bootstrap.min.js on lines 813..816
app/scripts/bootstrap.min.js on lines 1047..1050
app/scripts/bootstrap.min.js on lines 1723..1726
app/scripts/bootstrap.min.js on lines 1861..1864
app/scripts/bootstrap.min.js on lines 1979..1982

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

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

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

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

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

Refactorings

Further Reading

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

                var snippetsTweet = {
                    5: snippetGenerator(5, 'Tweet'),
                    6: snippetGenerator(6, 'Tweet'),
                    7: snippetGenerator(7, 'Tweet'),
                    8: snippetGenerator(8, 'Tweet')
Severity: Minor
Found in app/scripts/httpBackendStub.js and 1 other location - About 40 mins to fix
app/scripts/httpBackendStub.js on lines 50..55

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

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

  $.fn.button.noConflict = function () {
    $.fn.button = old
    return this
  }
Severity: Major
Found in app/scripts/bootstrap.min.js and 8 other locations - About 40 mins to fix
app/scripts/bootstrap.min.js on lines 154..157
app/scripts/bootstrap.min.js on lines 461..464
app/scripts/bootstrap.min.js on lines 645..648
app/scripts/bootstrap.min.js on lines 813..816
app/scripts/bootstrap.min.js on lines 1047..1050
app/scripts/bootstrap.min.js on lines 1723..1726
app/scripts/bootstrap.min.js on lines 1861..1864
app/scripts/bootstrap.min.js on lines 1979..1982

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

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

  $.fn.dropdown.noConflict = function () {
    $.fn.dropdown = old
    return this
  }
Severity: Major
Found in app/scripts/bootstrap.min.js and 8 other locations - About 40 mins to fix
app/scripts/bootstrap.min.js on lines 154..157
app/scripts/bootstrap.min.js on lines 259..262
app/scripts/bootstrap.min.js on lines 461..464
app/scripts/bootstrap.min.js on lines 645..648
app/scripts/bootstrap.min.js on lines 1047..1050
app/scripts/bootstrap.min.js on lines 1723..1726
app/scripts/bootstrap.min.js on lines 1861..1864
app/scripts/bootstrap.min.js on lines 1979..1982

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

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

  $.fn.scrollspy.noConflict = function () {
    $.fn.scrollspy = old
    return this
  }
Severity: Major
Found in app/scripts/bootstrap.min.js and 8 other locations - About 40 mins to fix
app/scripts/bootstrap.min.js on lines 154..157
app/scripts/bootstrap.min.js on lines 259..262
app/scripts/bootstrap.min.js on lines 461..464
app/scripts/bootstrap.min.js on lines 645..648
app/scripts/bootstrap.min.js on lines 813..816
app/scripts/bootstrap.min.js on lines 1047..1050
app/scripts/bootstrap.min.js on lines 1861..1864
app/scripts/bootstrap.min.js on lines 1979..1982

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

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

  $.fn.tab.noConflict = function () {
    $.fn.tab = old
    return this
  }
Severity: Major
Found in app/scripts/bootstrap.min.js and 8 other locations - About 40 mins to fix
app/scripts/bootstrap.min.js on lines 154..157
app/scripts/bootstrap.min.js on lines 259..262
app/scripts/bootstrap.min.js on lines 461..464
app/scripts/bootstrap.min.js on lines 645..648
app/scripts/bootstrap.min.js on lines 813..816
app/scripts/bootstrap.min.js on lines 1047..1050
app/scripts/bootstrap.min.js on lines 1723..1726
app/scripts/bootstrap.min.js on lines 1979..1982

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

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

        $scope.setForAllDescription = function (description) {
            images.images2upload.forEach(function (item) {
                item.description = description;
            });
        };
Severity: Minor
Found in app/scripts/controllers/upload-from-comp.js and 1 other location - About 40 mins to fix
app/scripts/controllers/upload-from-comp.js on lines 84..88

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

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

  $.fn.collapse.noConflict = function () {
    $.fn.collapse = old
    return this
  }
Severity: Major
Found in app/scripts/bootstrap.min.js and 8 other locations - About 40 mins to fix
app/scripts/bootstrap.min.js on lines 154..157
app/scripts/bootstrap.min.js on lines 259..262
app/scripts/bootstrap.min.js on lines 461..464
app/scripts/bootstrap.min.js on lines 813..816
app/scripts/bootstrap.min.js on lines 1047..1050
app/scripts/bootstrap.min.js on lines 1723..1726
app/scripts/bootstrap.min.js on lines 1861..1864
app/scripts/bootstrap.min.js on lines 1979..1982

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

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

        $scope.setForAllPhotographer = function (photographer) {
            images.images2upload.forEach(function (item) {
                item.photographer = photographer;
            });
        };
Severity: Minor
Found in app/scripts/controllers/upload-from-comp.js and 1 other location - About 40 mins to fix
app/scripts/controllers/upload-from-comp.js on lines 96..100

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

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

  $.fn.affix.noConflict = function () {
    $.fn.affix = old
    return this
  }
Severity: Major
Found in app/scripts/bootstrap.min.js and 8 other locations - About 40 mins to fix
app/scripts/bootstrap.min.js on lines 154..157
app/scripts/bootstrap.min.js on lines 259..262
app/scripts/bootstrap.min.js on lines 461..464
app/scripts/bootstrap.min.js on lines 645..648
app/scripts/bootstrap.min.js on lines 813..816
app/scripts/bootstrap.min.js on lines 1047..1050
app/scripts/bootstrap.min.js on lines 1723..1726
app/scripts/bootstrap.min.js on lines 1861..1864

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

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

  $.fn.modal.noConflict = function () {
    $.fn.modal = old
    return this
  }
Severity: Major
Found in app/scripts/bootstrap.min.js and 8 other locations - About 40 mins to fix
app/scripts/bootstrap.min.js on lines 154..157
app/scripts/bootstrap.min.js on lines 259..262
app/scripts/bootstrap.min.js on lines 461..464
app/scripts/bootstrap.min.js on lines 645..648
app/scripts/bootstrap.min.js on lines 813..816
app/scripts/bootstrap.min.js on lines 1723..1726
app/scripts/bootstrap.min.js on lines 1861..1864
app/scripts/bootstrap.min.js on lines 1979..1982

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

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

                {
                    name: 'Editorial Comments',
                    id: 'editorial-comments',
                    icon: 'editorial_comments',
                    template: 'views/pane-editorial-comments.html',
Severity: Major
Found in app/scripts/services/panes.js and 10 other locations - About 35 mins to fix
app/scripts/services/panes.js on lines 6..16
app/scripts/services/panes.js on lines 17..27
app/scripts/services/panes.js on lines 28..38
app/scripts/services/panes.js on lines 39..49
app/scripts/services/panes.js on lines 50..60
app/scripts/services/panes.js on lines 61..71
app/scripts/services/panes.js on lines 72..82
app/scripts/services/panes.js on lines 83..93
app/scripts/services/panes.js on lines 94..104
app/scripts/services/panes.js on lines 105..115

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

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

                {
                    name: 'Comments',
                    id: 'comments',
                    icon: 'comments',
                    template: 'views/pane-comments.html',
Severity: Major
Found in app/scripts/services/panes.js and 10 other locations - About 35 mins to fix
app/scripts/services/panes.js on lines 6..16
app/scripts/services/panes.js on lines 17..27
app/scripts/services/panes.js on lines 28..38
app/scripts/services/panes.js on lines 39..49
app/scripts/services/panes.js on lines 50..60
app/scripts/services/panes.js on lines 61..71
app/scripts/services/panes.js on lines 72..82
app/scripts/services/panes.js on lines 83..93
app/scripts/services/panes.js on lines 105..115
app/scripts/services/panes.js on lines 116..126

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

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

                {
                    name: 'Switches',
                    id: 'switches',
                    icon: 'switches',
                    template: 'views/pane-switches.html',
Severity: Major
Found in app/scripts/services/panes.js and 10 other locations - About 35 mins to fix
app/scripts/services/panes.js on lines 6..16
app/scripts/services/panes.js on lines 17..27
app/scripts/services/panes.js on lines 28..38
app/scripts/services/panes.js on lines 50..60
app/scripts/services/panes.js on lines 61..71
app/scripts/services/panes.js on lines 72..82
app/scripts/services/panes.js on lines 83..93
app/scripts/services/panes.js on lines 94..104
app/scripts/services/panes.js on lines 105..115
app/scripts/services/panes.js on lines 116..126

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

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

        this.imageRemoved = function (imageId) {
            images.removeFromIncluded(imageId);
            $rootScope.$apply(images.inArticleBody);
        };
Severity: Minor
Found in app/scripts/controllers/dropped-image.js and 1 other location - About 35 mins to fix
app/scripts/controllers/dropped-snippet.js on lines 37..40

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

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

angular.module('authoringEnvironmentApp').factory('getFileReader',
    function () {
        return {
            get: function() {
                return new FileReader();
Severity: Major
Found in app/scripts/services/get-file-reader.js and 3 other locations - About 35 mins to fix
app/scripts/services/date-factory.js on lines 8..16
app/scripts/services/form-data-factory.js on lines 8..16
app/scripts/services/image-factory.js on lines 8..16

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

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

angular.module('authoringEnvironmentApp').factory('formDataFactory',
    function () {
        return {
            makeInstance: function () {
                return new FormData();
Severity: Major
Found in app/scripts/services/form-data-factory.js and 3 other locations - About 35 mins to fix
app/scripts/services/date-factory.js on lines 8..16
app/scripts/services/get-file-reader.js on lines 3..11
app/scripts/services/image-factory.js on lines 8..16

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

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

                {
                    name: 'Slideshows',
                    id: 'slideshows',
                    icon: 'slideshows',
                    template: 'views/pane-slideshows.html',
Severity: Major
Found in app/scripts/services/panes.js and 10 other locations - About 35 mins to fix
app/scripts/services/panes.js on lines 6..16
app/scripts/services/panes.js on lines 17..27
app/scripts/services/panes.js on lines 28..38
app/scripts/services/panes.js on lines 39..49
app/scripts/services/panes.js on lines 50..60
app/scripts/services/panes.js on lines 61..71
app/scripts/services/panes.js on lines 83..93
app/scripts/services/panes.js on lines 94..104
app/scripts/services/panes.js on lines 105..115
app/scripts/services/panes.js on lines 116..126

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

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