rvalenciano/ngx-cron-jobs

View on GitHub

Showing 119 of 119 total issues

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

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 parse "0 * * 1 * ?" as at second :00 of every minute, on the 1st day, every month', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.month,
        minutes: [],
        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 196..208
src/app/lib/services/posix.service.spec.ts on lines 398..410
src/app/lib/services/quartz.service.spec.ts on lines 352..364

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

    it('should return "0 * * ? * 2" 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 3 other locations - About 3 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 168..180
src/app/lib/services/posix.service.spec.ts on lines 356..368
src/app/lib/services/quartz.service.spec.ts on lines 124..136

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 daysOfWeekQuartz = [
  {value: 1, label: 'Sunday'},
  {value: 2, label: 'Monday'},
  {value: 3, label: 'Tuesday'},
  {value: 4, label: 'Wednesday'},
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 1..9
src/app/lib/fixture.spec.ts on lines 86..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 on every minute on Monday', () => {
      const expected = {
        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 356..368
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 parse "4 * * * * as on every 4 minute of each hour', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.hour,
        minutes: [4],
        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 300..312
src/app/lib/services/quartz.service.spec.ts on lines 54..66
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 return "10 * * * *" when baseFrequency was set to hour on baseFrequencyForService min set to 10', () => {
      const frequency = {
        baseFrequency: fixture.baseFrequencyForService.hour,
        minutes: [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 98..110
src/app/lib/services/quartz.service.spec.ts on lines 54..66
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 return "* * 1 * *" 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 3 other locations - About 3 hrs to fix
src/app/lib/services/posix.service.spec.ts on lines 196..208
src/app/lib/services/quartz.service.spec.ts on lines 152..164
src/app/lib/services/quartz.service.spec.ts on lines 352..364

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

    it ('should parse "0 * * * 1 ?" as at second :00 of every minute, every day, in January', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.year,
        minutes: [],
        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 224..236
src/app/lib/services/posix.service.spec.ts on lines 426..438
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 "* 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 * 2 * * ?" as every minute at second :00 between 02am and 03am', () => {
      const expected = {
        baseFrequency: fixture.baseFrequencyForService.day,
        minutes: [],
        hours: [2],
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 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

Severity
Category
Status
Source
Language