Ks89/angular-modal-gallery

View on GitHub

Showing 513 of 513 total issues

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

export const LIBCONFIG_507: ModalLibConfig = {
  currentImageConfig: { downloadable: true },
  buttonsConfig: {
    visible: true,
    strategy: ButtonsStrategy.SIMPLE
Severity: Major
Found in examples/universal/src/app/modal-gallery/libconfigs.ts and 11 other locations - About 40 mins to fix
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 126..132
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 126..132
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 118..124
src/app/modal-gallery/libconfigs.ts on lines 110..116
src/app/modal-gallery/libconfigs.ts on lines 118..124
src/app/modal-gallery/libconfigs.ts on lines 126..132

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

export const LIBCONFIG_506: ModalLibConfig = {
  currentImageConfig: { downloadable: true },
  buttonsConfig: {
    visible: true,
    strategy: ButtonsStrategy.DEFAULT
Severity: Major
Found in examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts and 11 other locations - About 40 mins to fix
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 126..132
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 126..132
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 126..132
src/app/modal-gallery/libconfigs.ts on lines 110..116
src/app/modal-gallery/libconfigs.ts on lines 118..124
src/app/modal-gallery/libconfigs.ts on lines 126..132

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

export const LIBCONFIG_505: ModalLibConfig = {
  currentImageConfig: { downloadable: false },
  buttonsConfig: {
    visible: true,
    strategy: ButtonsStrategy.DEFAULT
Severity: Major
Found in src/app/modal-gallery/libconfigs.ts and 11 other locations - About 40 mins to fix
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 126..132
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 126..132
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 126..132
src/app/modal-gallery/libconfigs.ts on lines 118..124
src/app/modal-gallery/libconfigs.ts on lines 126..132

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

export const LIBCONFIG_505: ModalLibConfig = {
  currentImageConfig: { downloadable: false },
  buttonsConfig: {
    visible: true,
    strategy: ButtonsStrategy.DEFAULT
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 126..132
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 126..132
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 126..132
src/app/modal-gallery/libconfigs.ts on lines 110..116
src/app/modal-gallery/libconfigs.ts on lines 118..124
src/app/modal-gallery/libconfigs.ts on lines 126..132

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

export const LIBCONFIG_506: ModalLibConfig = {
  currentImageConfig: { downloadable: true },
  buttonsConfig: {
    visible: true,
    strategy: ButtonsStrategy.DEFAULT
Severity: Major
Found in examples/universal/src/app/modal-gallery/libconfigs.ts and 11 other locations - About 40 mins to fix
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 126..132
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 126..132
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 126..132
src/app/modal-gallery/libconfigs.ts on lines 110..116
src/app/modal-gallery/libconfigs.ts on lines 118..124
src/app/modal-gallery/libconfigs.ts on lines 126..132

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

      expect(plainImages[4].styles.background).toBe(`url("${IMAGES[4].plain?.img}") 50% 50% / cover`);
projects/ks89/angular-modal-gallery/src/lib/components/plain-gallery/plain-gallery.component.spec.ts on lines 456..456

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

    this.end = this.start + Math.min((this.previewConfig.number as number), this.images.length);
projects/ks89/angular-modal-gallery/src/lib/components/previews/previews.component.ts on lines 319..319

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

export const LIBCONFIG_507: ModalLibConfig = {
  currentImageConfig: { downloadable: true },
  buttonsConfig: {
    visible: true,
    strategy: ButtonsStrategy.SIMPLE
Severity: Major
Found in examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts and 11 other locations - About 40 mins to fix
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 126..132
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 126..132
src/app/modal-gallery/libconfigs.ts on lines 110..116
src/app/modal-gallery/libconfigs.ts on lines 118..124
src/app/modal-gallery/libconfigs.ts on lines 126..132

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

    if (this.maxSizeConfig.maxHeight) {
      this.renderer.setStyle(this.el.nativeElement, 'max-height', this.maxSizeConfig.maxHeight);
    }
projects/ks89/angular-modal-gallery/src/lib/directives/max-size.directive.ts on lines 68..70
projects/ks89/angular-modal-gallery/src/lib/directives/size.directive.ts on lines 72..74

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

export const LIBCONFIG_505: ModalLibConfig = {
  currentImageConfig: { downloadable: false },
  buttonsConfig: {
    visible: true,
    strategy: ButtonsStrategy.DEFAULT
Severity: Major
Found in examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts and 11 other locations - About 40 mins to fix
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 126..132
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 126..132
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 126..132
src/app/modal-gallery/libconfigs.ts on lines 110..116
src/app/modal-gallery/libconfigs.ts on lines 118..124
src/app/modal-gallery/libconfigs.ts on lines 126..132

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

export const LIBCONFIG_507: ModalLibConfig = {
  currentImageConfig: { downloadable: true },
  buttonsConfig: {
    visible: true,
    strategy: ButtonsStrategy.SIMPLE
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 126..132
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 126..132
src/app/modal-gallery/libconfigs.ts on lines 110..116
src/app/modal-gallery/libconfigs.ts on lines 118..124
src/app/modal-gallery/libconfigs.ts on lines 126..132

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

      expect(plainImages[3].styles.background).toBe(`url("${IMAGES[3].modal.img}") 50% 50% / cover`);
projects/ks89/angular-modal-gallery/src/lib/components/plain-gallery/plain-gallery.component.spec.ts on lines 436..436
projects/ks89/angular-modal-gallery/src/lib/components/plain-gallery/plain-gallery.component.spec.ts on lines 446..446

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

    if (this.maxSizeConfig.maxWidth) {
      this.renderer.setStyle(this.el.nativeElement, 'max-width', this.maxSizeConfig.maxWidth);
    }
projects/ks89/angular-modal-gallery/src/lib/directives/max-size.directive.ts on lines 71..73
projects/ks89/angular-modal-gallery/src/lib/directives/size.directive.ts on lines 72..74

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

      expect(plainImages[2].styles.background).toBe(`url("${IMAGES[2].plain?.img}") 50% 50% / cover`);
projects/ks89/angular-modal-gallery/src/lib/components/plain-gallery/plain-gallery.component.spec.ts on lines 476..476

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

    if (this.sizeConfig.height) {
      this.renderer.setStyle(this.el.nativeElement, 'height', this.sizeConfig.height);
    }
projects/ks89/angular-modal-gallery/src/lib/directives/max-size.directive.ts on lines 68..70
projects/ks89/angular-modal-gallery/src/lib/directives/max-size.directive.ts on lines 71..73

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

export const LIBCONFIG_507: ModalLibConfig = {
  currentImageConfig: { downloadable: true },
  buttonsConfig: {
    visible: true,
    strategy: ButtonsStrategy.SIMPLE
Severity: Major
Found in src/app/modal-gallery/libconfigs.ts and 11 other locations - About 40 mins to fix
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/angular-cli-18/src/app/modal-gallery/libconfigs.ts on lines 126..132
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/angular-cli-material/src/app/modal-gallery/libconfigs.ts on lines 126..132
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 110..116
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 118..124
examples/universal/src/app/modal-gallery/libconfigs.ts on lines 126..132
src/app/modal-gallery/libconfigs.ts on lines 110..116
src/app/modal-gallery/libconfigs.ts on lines 118..124

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

      expect(plainImages[1].styles.background).toBe(`url("${IMAGES[1].modal.img}") 50% 50% / cover`);
projects/ks89/angular-modal-gallery/src/lib/components/plain-gallery/plain-gallery.component.spec.ts on lines 436..436
projects/ks89/angular-modal-gallery/src/lib/components/plain-gallery/plain-gallery.component.spec.ts on lines 466..466

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

    this.start = this.end - Math.min((this.previewConfig.number as number), this.images.length);
projects/ks89/angular-modal-gallery/src/lib/components/previews/previews.component.ts on lines 297..297

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

      expect(plainImages[0].styles.background).toBe(`url("${IMAGES[0].modal.img}") 50% 50% / cover`);
projects/ks89/angular-modal-gallery/src/lib/components/plain-gallery/plain-gallery.component.spec.ts on lines 446..446
projects/ks89/angular-modal-gallery/src/lib/components/plain-gallery/plain-gallery.component.spec.ts on lines 466..466

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

Function checkPreviews has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

function checkPreviews(numPreviews: number, isFirstImage: boolean, isLastImage: boolean, clickable: boolean, accessibilityConfig: AccessibilityConfig = KS_DEFAULT_ACCESSIBILITY_CONFIG): void  {
    Severity
    Category
    Status
    Source
    Language