seblucas/cops-html-ui

View on GitHub

Showing 31 of 31 total issues

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

    controllerHelperServices.initControllerWithPaging(true)
                            .then(function(paging) {
      $scope.itemsPerPage = paging.itemsPerPage;
      $scope.itemsPerPageList = paging.itemsPerPageList;
      $scope.maxSize = paging.maxSize;
Severity: Major
Found in app/book/book-list-by-category.controller.js and 1 other location - About 4 hrs to fix
app/book/book-list.controller.js on lines 36..46

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

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

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

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

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

Refactorings

Further Reading

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

    controllerHelperServices.initControllerWithPaging(true)
                            .then(function(paging) {
      $scope.itemsPerPage = paging.itemsPerPage;
      $scope.itemsPerPageList = paging.itemsPerPageList;
      $scope.maxSize = paging.maxSize;
Severity: Major
Found in app/book/book-list.controller.js and 1 other location - About 4 hrs to fix
app/book/book-list-by-category.controller.js on lines 36..46

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

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

Function exports has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function(config) {
  config.set({

    // base path that will be used to resolve all patterns (eg. files, exclude)
    basePath: 'app/',
Severity: Minor
Found in karma.conf.js - About 1 hr to fix

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

        setTemplateValue: function(withBooks, value) {
          var item = configurationServices.constants.categoriesGridListTemplate;
          if (withBooks) {
            item = configurationServices.constants.booksGridListTemplate;
          }
    Severity: Major
    Found in app/services/controller-helper.service.js and 1 other location - About 1 hr to fix
    app/services/controller-helper.service.js on lines 29..35

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

    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

        setPageSizeValue: function(withBooks, value) {
          var item = configurationServices.constants.categoriesPerPage;
          if (withBooks) {
            item = configurationServices.constants.booksPerPage;
          }
    Severity: Major
    Found in app/services/controller-helper.service.js and 1 other location - About 1 hr to fix
    app/services/controller-helper.service.js on lines 36..42

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

    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

    gulp.task('css', function() {
        return gulp.src(cssSources)
            .pipe(concat('cops.css'))
            .pipe(gulp.dest(dist.css));
    });
    Severity: Major
    Found in gulpfile.js and 1 other location - About 1 hr to fix
    gulpfile.js on lines 83..87

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

    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

    gulp.task('js', function() {
        return gulp.src(jsSources)
            .pipe(concat('cops.js'))
            .pipe(gulp.dest(dist.js));
    });
    Severity: Major
    Found in gulpfile.js and 1 other location - About 1 hr to fix
    gulpfile.js on lines 89..93

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

    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

      {
        'name': 'cops-html-ui IE11 node v' + process.env.TRAVIS_NODE_VERSION,
        'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
        'browserName': 'internet explorer',
        'platform': 'Windows 8.1',
    Severity: Major
    Found in protractor.conf.js and 1 other location - About 1 hr to fix
    protractor.conf.js on lines 47..53

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

    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

      {
        'name': 'cops-html-ui chrome node v' + process.env.TRAVIS_NODE_VERSION,
        'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
        'browserName': 'chrome',
        'platform': 'Windows 8.1',
    Severity: Major
    Found in protractor.conf.js and 1 other location - About 1 hr to fix
    protractor.conf.js on lines 54..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 55.

    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

        return gulp.src([source + 'index_prod.html'])
            .pipe(replace(/<!-- e2e -->/g, '<script src="js/angular-mocks.js"></script><script src="js/CopsE2E.js"></script>'))
            .pipe(replace(/ng-app="Cops"/g, 'ng-app="CopsE2E"'))
            .pipe(rename('index_protractor.html'))
    Severity: Minor
    Found in gulpfile.js and 1 other location - About 35 mins to fix
    gulpfile.js on lines 101..104

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

    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

        return gulp.src([source + 'lang/*'])
            .pipe(replace(/"content\.series\.data"\:(.*?)\{0\}(.*?),/g, '"content.series.data":$1{{number}}$2,'))
            .pipe(replace(/"content\.series\.data"\:(.*?)\{1\}(.*?),/g, '"content.series.data":$1{{name}}$2,'))
            .pipe(replace(/"splitByLetter\.letter"\:(.*?)\{0\}(.*?),/g, '"splitByLetter.letter":$1{{category}}$2,'))
    Severity: Minor
    Found in gulpfile.js and 1 other location - About 35 mins to fix
    gulpfile.js on lines 167..170

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

    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

    Adjoining classes: .ng-leave.ng-leave-active
    Open

    .ng-leave.ng-leave-active {
    Severity: Minor
    Found in app/css/angular-animate.css by csslint

    Rule doesn't have all its properties in alphabetical order.
    Open

        .navbar-form-margin {
    Severity: Minor
    Found in app/css/cops.css by csslint

    Adjoining classes: .row.no-gutters
    Open

    .row.no-gutters {
    Severity: Minor
    Found in app/css/cops.css by csslint

    Adjoining classes: .ng-enter.ng-enter-active
    Open

    .ng-enter.ng-enter-active {
    Severity: Minor
    Found in app/css/angular-animate.css by csslint

    Rule doesn't have all its properties in alphabetical order.
    Open

    .row.no-gutters > [class^="col-"],
    Severity: Minor
    Found in app/css/cops.css by csslint

    Attribute selectors with *= are slow!
    Open

    .row.no-gutters > [class*=" col-"] {
    Severity: Minor
    Found in app/css/cops.css by csslint

    Rule doesn't have all its properties in alphabetical order.
    Open

    .cover-image img {
    Severity: Minor
    Found in app/css/cops.css by csslint

    Element (li.media) is overqualified, just use .media without element name.
    Open

    li.media {
    Severity: Minor
    Found in app/css/cops.css by csslint

    Attribute selectors with ^= are slow!
    Open

    .row.no-gutters > [class^="col-"],
    Severity: Minor
    Found in app/css/cops.css by csslint
    Severity
    Category
    Status
    Source
    Language