Ks89/angular-modal-gallery

View on GitHub

Showing 513 of 513 total issues

File libconfigs.ts has 515 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import {
  ButtonsStrategy,
  ButtonType,
  Description,
  DescriptionStrategy,
Severity: Major
Found in examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts - About 1 day to fix

    File libconfigs.ts has 515 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import {
      ButtonsStrategy,
      ButtonType,
      Description,
      DescriptionStrategy,
    Severity: Major
    Found in examples/universal/src/app/modal-gallery/libconfigs.ts - About 1 day to fix

      File libconfigs.ts has 515 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import {
        ButtonsStrategy,
        ButtonType,
        Description,
        DescriptionStrategy,
      Severity: Major
      Found in examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts - About 1 day to fix

        File carousel.component.ts has 513 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         The MIT License (MIT)
        
         Copyright (c) 2017-2024 Stefano Cappa (Ks89)
        
        
        Severity: Major
        Found in examples/angular-cli-material/src/app/carousel/carousel.component.ts - About 1 day to fix

          File carousel.component.ts has 513 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*
           The MIT License (MIT)
          
           Copyright (c) 2017-2024 Stefano Cappa (Ks89)
          
          
          Severity: Major
          Found in examples/angular-cli-18/src/app/carousel/carousel.component.ts - About 1 day to fix

            File carousel.component.ts has 513 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*
             The MIT License (MIT)
            
             Copyright (c) 2017-2021 Stefano Cappa (Ks89)
            
            
            Severity: Major
            Found in examples/universal/src/app/carousel/carousel.component.ts - About 1 day to fix

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

              const TEST_MODEL_INFINITE: TestModel[] = [
                {
                  currentImgTitle: 'Image 1/5',
                  currentAlt: 'Image 1',
                  currentDescription: 'Image 1/5',
              projects/ks89/angular-modal-gallery/src/lib/components/current-image/current-image.component.spec.ts on lines 50..96

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

              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

              const TEST_MODEL: TestModel[] = [
                {
                  currentImgTitle: 'Image 1/5',
                  currentAlt: 'Image 1',
                  currentDescription: 'Image 1/5',
              projects/ks89/angular-modal-gallery/src/lib/components/current-image/current-image.component.spec.ts on lines 100..146

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

              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 const LIBCONFIG_612: ModalLibConfig = {
                accessibilityConfig: {
                  backgroundAriaLabel: 'CUSTOM Modal gallery full screen background',
                  backgroundTitle: 'CUSTOM background title',
              
              
              Severity: Major
              Found in examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts and 3 other locations - About 1 day to fix
              examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 462..507
              examples/universal/src/app/modal-gallery/libconfigs.ts on lines 462..507
              src/app/modal-gallery/libconfigs.ts on lines 462..507

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

              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 const LIBCONFIG_612: ModalLibConfig = {
                accessibilityConfig: {
                  backgroundAriaLabel: 'CUSTOM Modal gallery full screen background',
                  backgroundTitle: 'CUSTOM background title',
              
              
              Severity: Major
              Found in examples/universal/src/app/modal-gallery/libconfigs.ts and 3 other locations - About 1 day to fix
              examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 462..507
              examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 462..507
              src/app/modal-gallery/libconfigs.ts on lines 462..507

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

              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 const LIBCONFIG_612: ModalLibConfig = {
                accessibilityConfig: {
                  backgroundAriaLabel: 'CUSTOM Modal gallery full screen background',
                  backgroundTitle: 'CUSTOM background title',
              
              
              examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 462..507
              examples/universal/src/app/modal-gallery/libconfigs.ts on lines 462..507
              src/app/modal-gallery/libconfigs.ts on lines 462..507

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

              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 const LIBCONFIG_612: ModalLibConfig = {
                accessibilityConfig: {
                  backgroundAriaLabel: 'CUSTOM Modal gallery full screen background',
                  backgroundTitle: 'CUSTOM background title',
              
              
              Severity: Major
              Found in src/app/modal-gallery/libconfigs.ts and 3 other locations - About 1 day to fix
              examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 462..507
              examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 462..507
              examples/universal/src/app/modal-gallery/libconfigs.ts on lines 462..507

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

              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

              File carousel.component.ts has 499 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*
               The MIT License (MIT)
              
               Copyright (c) 2017-2024 Stefano Cappa (Ks89)
              
              

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

                const NAVIGATION_NEXT_PREVIEWS: NavigationTestData[] = [
                  {
                    initial: {start: 0, end: 4, activeIndex: 0},
                    expected: {start: 1, end: 5, activeIndex: 2}
                  },
                projects/ks89/angular-modal-gallery/src/lib/components/carousel/carousel-previews/carousel-previews.component.spec.ts on lines 140..157

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

                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

                const NAVIGATION_PREV_PREVIEWS: NavigationTestData[] = [
                  {
                    initial: {start: 3, end: 7, activeIndex: 6},
                    expected: {start: 2, end: 6, activeIndex: 4}
                  },
                projects/ks89/angular-modal-gallery/src/lib/components/carousel/carousel-previews/carousel-previews.component.spec.ts on lines 121..138

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

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

                  setConfig(id: number, obj: LibConfig | undefined): void {
                    this.initIfNotExists(id);
                    if (!obj) {
                      return;
                    }

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

                  export const LIBCONFIG_524: ModalLibConfig = {
                    currentImageConfig: {
                      downloadable: true
                    },
                    buttonsConfig: {
                  examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 287..325
                  examples/universal/src/app/modal-gallery/libconfigs.ts on lines 287..325
                  src/app/modal-gallery/libconfigs.ts on lines 287..325

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

                  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 const LIBCONFIG_524: ModalLibConfig = {
                    currentImageConfig: {
                      downloadable: true
                    },
                    buttonsConfig: {
                  Severity: Major
                  Found in examples/universal/src/app/modal-gallery/libconfigs.ts and 3 other locations - About 7 hrs to fix
                  examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 287..325
                  examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 287..325
                  src/app/modal-gallery/libconfigs.ts on lines 287..325

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

                  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 const LIBCONFIG_524: ModalLibConfig = {
                    currentImageConfig: {
                      downloadable: true
                    },
                    buttonsConfig: {
                  Severity: Major
                  Found in src/app/modal-gallery/libconfigs.ts and 3 other locations - About 7 hrs to fix
                  examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 287..325
                  examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 287..325
                  examples/universal/src/app/modal-gallery/libconfigs.ts on lines 287..325

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

                  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 const LIBCONFIG_524: ModalLibConfig = {
                    currentImageConfig: {
                      downloadable: true
                    },
                    buttonsConfig: {
                  Severity: Major
                  Found in examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts and 3 other locations - About 7 hrs to fix
                  examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 287..325
                  examples/universal/src/app/modal-gallery/libconfigs.ts on lines 287..325
                  src/app/modal-gallery/libconfigs.ts on lines 287..325

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

                  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