rvalenciano/ngx-cron-jobs

View on GitHub

Showing 108 of 119 total issues

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

    it ('should parse "0 23 1 1 * ?" as at 01:23:00am, on the 1st day, every month', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.month,
        minutes: [23],
        hours: [1],
Severity: Major
Found in src/app/lib/services/quartz.service.spec.ts and 1 other location - About 3 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 210..222

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

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

    it ('should parse "0 10 1 ? * 2" as at 01:10:00am, on every Monday, every month', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.week,
        minutes: [10],
        hours: [1],
Severity: Major
Found in src/app/lib/services/quartz.service.spec.ts and 2 other locations - About 3 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 182..194
src/app/lib/services/quartz.service.spec.ts on lines 208..220

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

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

    it ('should parse "0 1 1 ? * 2" as At 01:01:00am, on every Monday, every month', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.week,
        minutes: [1],
        hours: [1],
Severity: Major
Found in src/app/lib/services/quartz.service.spec.ts and 2 other locations - About 3 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 182..194
src/app/lib/services/quartz.service.spec.ts on lines 138..150

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

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 parse "23 3 1 * *" as at 03:23 on day-of-month 1', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.month,
        minutes: [23],
        hours: [3],
Severity: Major
Found in src/app/lib/services/posix.service.spec.ts and 1 other location - About 3 hrs to fix
src/app/lib/services/quartz.service.spec.ts on lines 166..178

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

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

    it('should parse "10 1 * * 1" as at 01:10 on Monday', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.week,
        minutes: [10],
        hours: [1],
Severity: Major
Found in src/app/lib/services/posix.service.spec.ts and 2 other locations - About 3 hrs to fix
src/app/lib/services/quartz.service.spec.ts on lines 138..150
src/app/lib/services/quartz.service.spec.ts on lines 208..220

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

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 parse "0 10 2,14 * * ?" as at second :00, at minute :10, at 02am and 14pm, of every day', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.day,
        minutes: [10],
        hours: [2, 14],
Severity: Major
Found in src/app/lib/services/quartz.service.spec.ts and 1 other location - About 3 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 154..166

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

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 "10,14 * * * *" when baseFrequency was set to hour on baseFrequencyForService min set to 10,14', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.hour,
        minutes: [10, 14],
        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 112..124
src/app/lib/services/quartz.service.spec.ts on lines 68..80
src/app/lib/services/quartz.service.spec.ts on lines 268..280

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

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 10,14 * * * ?" when baseFrequency was set to hour on baseFrequencyForService and minutes set', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.hour,
        minutes: [10, 14],
        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 112..124
src/app/lib/services/posix.service.spec.ts on lines 314..326
src/app/lib/services/quartz.service.spec.ts on lines 68..80

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

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,10 * * ?" when baseFrequency was set to day on baseFrequencyForService and hours set', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.day,
        minutes: [],
        hours: [1, 10],
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 140..152
src/app/lib/services/posix.service.spec.ts on lines 342..354
src/app/lib/services/quartz.service.spec.ts on lines 96..108

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

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 "* * 1,23 * *" when baseFrequency was set to month on baseFrequencyForService and daysOfMonth set', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.month,
        minutes: [],
        hours: [],
Severity: Major
Found in src/app/lib/services/posix.service.spec.ts and 1 other location - About 3 hrs to fix
src/app/lib/services/quartz.service.spec.ts on lines 366..378

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

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 "* * * * 1,5" 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 1 other location - About 3 hrs to fix
src/app/lib/services/quartz.service.spec.ts on lines 324..336

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

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 * * ? * 2,6" 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 1 other location - About 3 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 370..382

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

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 * * 1,23 * ?" when baseFrequency was set to month on baseFrequencyForService and daysOfMonth set', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.month,
        minutes: [],
        hours: [],
Severity: Major
Found in src/app/lib/services/quartz.service.spec.ts and 1 other location - About 3 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 412..424

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

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,10 * * *" when baseFrequency was set to day on baseFrequencyForService and hours set', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.day,
        minutes: [],
        hours: [1, 10],
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 140..152
src/app/lib/services/quartz.service.spec.ts on lines 96..108
src/app/lib/services/quartz.service.spec.ts on lines 296..308

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

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 * 2,14 * * ?" as at second :00, every minute, at 02am and 14pm, of every day', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.day,
        minutes: [],
        hours: [2, 14],
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 140..152
src/app/lib/services/posix.service.spec.ts on lines 342..354
src/app/lib/services/quartz.service.spec.ts on lines 296..308

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

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 "* * * 3,4 *" 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 1 other location - About 3 hrs to fix
src/app/lib/services/quartz.service.spec.ts on lines 394..406

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

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,10 * * * ?" as at second :00, at minutes :04 and :10, of every hour', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.hour,
        minutes: [4, 10],
        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 112..124
src/app/lib/services/posix.service.spec.ts on lines 314..326
src/app/lib/services/quartz.service.spec.ts on lines 268..280

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

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,14 * * *" as on every 2 and 14 hour of each day', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.day,
        minutes: [],
        hours: [2, 14],
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 342..354
src/app/lib/services/quartz.service.spec.ts on lines 96..108
src/app/lib/services/quartz.service.spec.ts on lines 296..308

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

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 * * * 3,4 ?" 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/quartz.service.spec.ts and 1 other location - About 3 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 440..452

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

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 "4,10 * * * *" as on every 4 and 10 minute of each hour', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.hour,
        minutes: [4, 10],
        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 314..326
src/app/lib/services/quartz.service.spec.ts on lines 68..80
src/app/lib/services/quartz.service.spec.ts on lines 268..280

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

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