MSakamaki/ngx-onesignal

View on GitHub

Showing 33 of 33 total issues

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

  it(`should have as title 'sandbox'`, () => {
    const fixture = TestBed.createComponent(AppComponent);
    const app = fixture.componentInstance;
    expect(app.title).toEqual('sandbox');
  });
Severity: Major
Found in sandbox/10/src/app/app.component.spec.ts and 1 other location - About 1 hr to fix
sandbox/9/src/app/app.component.spec.ts on lines 19..23

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

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 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function (config) {
  config.set({
    basePath: '',
    frameworks: ['jasmine', '@angular-devkit/build-angular'],
    plugins: [
Severity: Minor
Found in sandbox/9/karma.conf.js - About 1 hr to fix

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

    module.exports = function (config) {
      config.set({
        basePath: '',
        frameworks: ['jasmine', '@angular-devkit/build-angular'],
        plugins: [
    Severity: Minor
    Found in projects/ngx-onesignal/karma.conf.js - About 1 hr to fix

      Function replaceServiceWorkerScript has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function replaceServiceWorkerScript(options: ngxOneSignalSchema): Rule {
        return (tree: Tree, context: SchematicContext) => {
          const workspace = getWorkspace(tree);
          const project = getProjectFromWorkspace(workspace, options.project);
          const modulePath = getAppModulePath(tree, getProjectMainFile(project));
      Severity: Minor
      Found in tools/schematics/ng-add/setup.ts - About 1 hr to fix

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

        module.exports = function (config) {
          config.set({
            basePath: '',
            frameworks: ['jasmine', '@angular-devkit/build-angular'],
            plugins: [
        Severity: Minor
        Found in sandbox/10/karma.conf.js - About 1 hr to fix

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

          module.exports = function (config) {
            config.set({
              basePath: '',
              frameworks: ['jasmine', '@angular-devkit/build-angular'],
              plugins: [
          Severity: Minor
          Found in sandbox/8/karma.conf.js - About 1 hr to fix

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

            module.exports = function (config) {
              config.set({
                basePath: '',
                frameworks: ['jasmine', '@angular-devkit/build-angular'],
                plugins: [
            Severity: Minor
            Found in src/karma.conf.js - About 1 hr to fix

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

                it('should create the app', () => {
                  const fixture = TestBed.createComponent(AppComponent);
                  const app = fixture.componentInstance;
                  expect(app).toBeTruthy();
                });
              Severity: Minor
              Found in sandbox/9/src/app/app.component.spec.ts and 1 other location - About 55 mins to fix
              sandbox/10/src/app/app.component.spec.ts on lines 13..17

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

              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

                it('should create the app', () => {
                  const fixture = TestBed.createComponent(AppComponent);
                  const app = fixture.componentInstance;
                  expect(app).toBeTruthy();
                });
              Severity: Minor
              Found in sandbox/10/src/app/app.component.spec.ts and 1 other location - About 55 mins to fix
              sandbox/9/src/app/app.component.spec.ts on lines 13..17

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

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

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

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

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

              Refactorings

              Further Reading

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

              export class AppModule { }
              Severity: Major
              Found in sandbox/8/src/app/app.module.ts and 3 other locations - About 30 mins to fix
              sandbox/10/src/app/app.module.ts on lines 16..16
              sandbox/9/src/app/app.module.ts on lines 16..16
              sandbox/nx/apps/sandbox/src/app/app.module.ts on lines 12..12

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

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

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

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

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

              Refactorings

              Further Reading

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

              export class AppModule { }
              Severity: Major
              Found in sandbox/9/src/app/app.module.ts and 3 other locations - About 30 mins to fix
              sandbox/10/src/app/app.module.ts on lines 16..16
              sandbox/8/src/app/app.module.ts on lines 16..16
              sandbox/nx/apps/sandbox/src/app/app.module.ts on lines 12..12

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

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

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

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

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

              Refactorings

              Further Reading

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

              export class AppModule {}
              Severity: Major
              Found in sandbox/nx/apps/sandbox/src/app/app.module.ts and 3 other locations - About 30 mins to fix
              sandbox/10/src/app/app.module.ts on lines 16..16
              sandbox/8/src/app/app.module.ts on lines 16..16
              sandbox/9/src/app/app.module.ts on lines 16..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 45.

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

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

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

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

              Refactorings

              Further Reading

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

              export class AppModule { }
              Severity: Major
              Found in sandbox/10/src/app/app.module.ts and 3 other locations - About 30 mins to fix
              sandbox/8/src/app/app.module.ts on lines 16..16
              sandbox/9/src/app/app.module.ts on lines 16..16
              sandbox/nx/apps/sandbox/src/app/app.module.ts on lines 12..12

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

              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