rvalenciano/ngx-cron-jobs

View on GitHub

Showing 119 of 119 total issues

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

    it('should return "* * * * 1" when baseFrequency was set to week on baseFrequencyForService and daysOfWeek set', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.week,
        minutes: [],
        hours: [],
Severity: Major
Found in src/app/lib/services/posix.service.spec.ts and 3 other locations - About 3 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 168..180
src/app/lib/services/quartz.service.spec.ts on lines 124..136
src/app/lib/services/quartz.service.spec.ts on lines 310..322

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

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

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

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

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

Refactorings

Further Reading

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

    it('should return "* 1 * * *" when baseFrequency was set to day on baseFrequencyForService and hours set', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.day,
        minutes: [],
        hours: [1],
Severity: Major
Found in src/app/lib/services/posix.service.spec.ts and 3 other locations - About 3 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 126..138
src/app/lib/services/quartz.service.spec.ts on lines 82..94
src/app/lib/services/quartz.service.spec.ts on lines 282..294

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

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

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

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

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

Refactorings

Further Reading

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

    it ('should parse "0 4 * * * ?" as at second :00 of minute :04 of every hour', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.hour,
        minutes: [4],
        hours: [],
Severity: Major
Found in src/app/lib/services/quartz.service.spec.ts and 3 other locations - About 3 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 98..110
src/app/lib/services/posix.service.spec.ts on lines 300..312
src/app/lib/services/quartz.service.spec.ts on lines 255..267

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

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

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

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

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

Refactorings

Further Reading

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

    it('should parse "* 2 * * *" as on every 2 hour of each day', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.day,
        minutes: [],
        hours: [2],
Severity: Major
Found in src/app/lib/services/posix.service.spec.ts and 3 other locations - About 3 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 328..340
src/app/lib/services/quartz.service.spec.ts on lines 82..94
src/app/lib/services/quartz.service.spec.ts on lines 282..294

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

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

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

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

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

Refactorings

Further Reading

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

    it('should return "0 * 1 * * ?" when baseFrequency was set to day on baseFrequencyForService and hours set', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.day,
        minutes: [],
        hours: [1],
Severity: Major
Found in src/app/lib/services/quartz.service.spec.ts and 3 other locations - About 3 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 126..138
src/app/lib/services/posix.service.spec.ts on lines 328..340
src/app/lib/services/quartz.service.spec.ts on lines 82..94

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

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

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

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

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

Refactorings

Further Reading

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

    it('should parse "* * * 1 *" as at every minute in January', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.year,
        minutes: [],
        hours: [],
Severity: Major
Found in src/app/lib/services/posix.service.spec.ts and 3 other locations - About 3 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 426..438
src/app/lib/services/quartz.service.spec.ts on lines 180..192
src/app/lib/services/quartz.service.spec.ts on lines 380..392

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

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

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

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

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

Refactorings

Further Reading

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

    it('should return "* * * 3 *" when baseFrequency was set to year on baseFrequencyForService and months set', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.year,
        minutes: [],
        hours: [],
Severity: Major
Found in src/app/lib/services/posix.service.spec.ts and 3 other locations - About 3 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 224..236
src/app/lib/services/quartz.service.spec.ts on lines 180..192
src/app/lib/services/quartz.service.spec.ts on lines 380..392

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

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

export const baseFrequency = [
  {value: 0, label: 'Please select'},
  {value: 1, label: 'Minute'},
  {value: 2, label: 'Hour'},
  {value: 3, label: 'Day'},
Severity: Major
Found in src/app/lib/fixture.spec.ts and 2 other locations - About 3 hrs to fix
src/app/lib/fixture.spec.ts on lines 86..94
src/app/lib/fixture.spec.ts on lines 96..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 95.

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

    it('should return "* * * * *" when baseFrequency was set to week on baseFrequencyForService and daysOfWeek set', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.week,
        minutes: [],
        hours: [],
Severity: Major
Found in src/app/lib/services/posix.service.spec.ts and 5 other locations - About 2 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 84..96
src/app/lib/services/posix.service.spec.ts on lines 286..298
src/app/lib/services/quartz.service.spec.ts on lines 40..52
src/app/lib/services/quartz.service.spec.ts on lines 241..253
src/app/lib/services/quartz.service.spec.ts on lines 338..350

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

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

    it('should return "* * * * *" when baseFrequency was set to minute on baseFrequencyForService', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.minute,
        minutes: [],
        hours: [],
Severity: Major
Found in src/app/lib/services/posix.service.spec.ts and 5 other locations - About 2 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 84..96
src/app/lib/services/posix.service.spec.ts on lines 384..396
src/app/lib/services/quartz.service.spec.ts on lines 40..52
src/app/lib/services/quartz.service.spec.ts on lines 241..253
src/app/lib/services/quartz.service.spec.ts on lines 338..350

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

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

    it('should parse "0 * * * * ?" as at second :00 of every minute', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.minute,
        minutes: [],
        hours: [],
Severity: Major
Found in src/app/lib/services/quartz.service.spec.ts and 5 other locations - About 2 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 84..96
src/app/lib/services/posix.service.spec.ts on lines 286..298
src/app/lib/services/posix.service.spec.ts on lines 384..396
src/app/lib/services/quartz.service.spec.ts on lines 241..253
src/app/lib/services/quartz.service.spec.ts on lines 338..350

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

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

    it('should return "0 * * * * ?" when baseFrequency was set to minute on baseFrequencyForService', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.minute,
        minutes: [],
        hours: [],
Severity: Major
Found in src/app/lib/services/quartz.service.spec.ts and 5 other locations - About 2 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 84..96
src/app/lib/services/posix.service.spec.ts on lines 286..298
src/app/lib/services/posix.service.spec.ts on lines 384..396
src/app/lib/services/quartz.service.spec.ts on lines 40..52
src/app/lib/services/quartz.service.spec.ts on lines 338..350

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

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

    it('should parse * * * * * as every minute', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.minute,
        minutes: [],
        hours: [],
Severity: Major
Found in src/app/lib/services/posix.service.spec.ts and 5 other locations - About 2 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 286..298
src/app/lib/services/posix.service.spec.ts on lines 384..396
src/app/lib/services/quartz.service.spec.ts on lines 40..52
src/app/lib/services/quartz.service.spec.ts on lines 241..253
src/app/lib/services/quartz.service.spec.ts on lines 338..350

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

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

    it('should return "0 * * ? * *" when baseFrequency was set to week on baseFrequencyForService and daysOfWeek set', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.week,
        minutes: [],
        hours: [],
Severity: Major
Found in src/app/lib/services/quartz.service.spec.ts and 5 other locations - About 2 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 84..96
src/app/lib/services/posix.service.spec.ts on lines 286..298
src/app/lib/services/posix.service.spec.ts on lines 384..396
src/app/lib/services/quartz.service.spec.ts on lines 40..52
src/app/lib/services/quartz.service.spec.ts on lines 241..253

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

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

    it('should return "0 10 4 2 3,4 ?" when baseFrequency was set to year on baseFrequencyForService and months set', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.year,
        minutes: [10],
        hours: [4],
Severity: Major
Found in src/app/lib/services/quartz.service.spec.ts and 1 other location - About 2 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 455..467

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

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

      'and all data set beside daysOfWeek', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.year,
        minutes: [10],
        hours: [4],
Severity: Major
Found in src/app/lib/services/posix.service.spec.ts and 1 other location - About 2 hrs to fix
src/app/lib/services/quartz.service.spec.ts on lines 408..420

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

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 return empty string when baseFrequency key of frequency object was set to none on' +
      'baseFrequencyForService', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.none,
        minutes: [],
Severity: Major
Found in src/app/lib/services/posix.service.spec.ts and 1 other location - About 2 hrs to fix
src/app/lib/services/quartz.service.spec.ts on lines 227..239

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

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 return empty string when baseFrequency key of frequency object was set to none on' +
      'baseFrequencyForService', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.none,
        minutes: [],
Severity: Major
Found in src/app/lib/services/quartz.service.spec.ts and 1 other location - About 2 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 272..284

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

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

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

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

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

Refactorings

Further Reading

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

  public fromCronWithDefault(value: String): CronJobsFrequency {
    const cron = value.trim().replace(/\s+/g, ' ').split(' ');
    const frequency = this.getDefaultFrequenceWithDefault();

    return this.fromCronQuartzInternal(cron, frequency);
Severity: Major
Found in src/app/lib/services/quartz.service.ts and 3 other locations - About 2 hrs to fix
src/app/lib/services/posix.service.ts on lines 47..52
src/app/lib/services/posix.service.ts on lines 54..59
src/app/lib/services/quartz.service.ts on lines 24..28

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

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

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

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

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

Refactorings

Further Reading

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

  public fromCron(value: String): CronJobsFrequency {
    const cron = value.trim().replace(/\s+/g, ' ').split(' ');
    const frequency = this.getDefaultFrequency();
    return this.fromCronQuartzInternal(cron, frequency);
  }
Severity: Major
Found in src/app/lib/services/quartz.service.ts and 3 other locations - About 2 hrs to fix
src/app/lib/services/posix.service.ts on lines 47..52
src/app/lib/services/posix.service.ts on lines 54..59
src/app/lib/services/quartz.service.ts on lines 17..22

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

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