seagull-js/seagull

View on GitHub

Showing 43 of 54 total issues

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

  private result<Value>(cb: any, value: Value) {
    return cb ? (void cb(null, value) as void) : this.requestObject(value)
  }
Severity: Major
Found in packages/mock-s3/src/mock-mem.ts and 3 other locations - About 1 hr to fix
packages/mock-cloudwatchlogs/src/mock_cloudwatchlogs_fs.ts on lines 140..142
packages/mock-cloudwatchlogs/src/mock_cloudwatchlogs_mem.ts on lines 106..108
packages/mock-s3/src/mock-fs.ts on lines 105..107

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

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

  private handleError = (err: any) => {
    this.bus.emit(LogEvent, 'ServerBundleService', 'BundleError', { err })
    this.bus.emit(BundleServerErrorEvent)
  }
Severity: Major
Found in packages/build/src/services/bundler/server.ts and 4 other locations - About 55 mins to fix
packages/build/src/services/bundler/backend_page.ts on lines 57..60
packages/build/src/services/bundler/browser_page.ts on lines 67..70
packages/build/src/services/bundler/lambda.ts on lines 56..59
packages/build/src/services/bundler/vendor.ts on lines 51..54

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

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

  private handleError = (err: any) => {
    this.bus.emit(LogEvent, 'LambdaBundleService', 'BundleError', { err })
    this.bus.emit(BundleLambdaErrorEvent)
  }
Severity: Major
Found in packages/build/src/services/bundler/lambda.ts and 4 other locations - About 55 mins to fix
packages/build/src/services/bundler/backend_page.ts on lines 57..60
packages/build/src/services/bundler/browser_page.ts on lines 67..70
packages/build/src/services/bundler/server.ts on lines 51..54
packages/build/src/services/bundler/vendor.ts on lines 51..54

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

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

  private handleError = (err: any) => {
    this.bus.emit(LogEvent, 'VendorBundleService', 'BundleError', { err })
    this.bus.emit(BundleVendorErrorEvent)
  }
Severity: Major
Found in packages/build/src/services/bundler/vendor.ts and 4 other locations - About 55 mins to fix
packages/build/src/services/bundler/backend_page.ts on lines 57..60
packages/build/src/services/bundler/browser_page.ts on lines 67..70
packages/build/src/services/bundler/lambda.ts on lines 56..59
packages/build/src/services/bundler/server.ts on lines 51..54

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

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

  private handleError = (err: any) => {
    this.bus.emit(LogEvent, 'BackendPageBundleService', 'BundleError', { err })
    this.bus.emit(BundleBackendPageErrorEvent)
  }
Severity: Major
Found in packages/build/src/services/bundler/backend_page.ts and 4 other locations - About 55 mins to fix
packages/build/src/services/bundler/browser_page.ts on lines 67..70
packages/build/src/services/bundler/lambda.ts on lines 56..59
packages/build/src/services/bundler/server.ts on lines 51..54
packages/build/src/services/bundler/vendor.ts on lines 51..54

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

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

  private handleError = (err: any) => {
    this.bus.emit(LogEvent, 'BrowserPageBundleService', 'BundleError', { err })
    this.bus.emit(BundleBrowserPageErrorEvent)
  }
Severity: Major
Found in packages/build/src/services/bundler/browser_page.ts and 4 other locations - About 55 mins to fix
packages/build/src/services/bundler/backend_page.ts on lines 57..60
packages/build/src/services/bundler/lambda.ts on lines 56..59
packages/build/src/services/bundler/server.ts on lines 51..54
packages/build/src/services/bundler/vendor.ts on lines 51..54

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

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

    constructor() {
        const { credentials, region } = config
        this.s3 = new S3({ credentials, region })
    }
Severity: Major
Found in packages/deploy-aws/src/aws_sdk_handler/handle_s3.ts and 3 other locations - About 50 mins to fix
packages/deploy-aws/src/aws_sdk_handler/handle_cloudfront.ts on lines 12..15
packages/deploy-aws/src/aws_sdk_handler/handle_ssm.ts on lines 27..30
packages/deploy-aws/src/aws_sdk_handler/handle_sts.ts on lines 10..13

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

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

export interface CompilerServiceEvents extends OutputServiceEvents {
  [CompileEvent]: CompilerService['handleStartCompilation']
  [CompiledEvent]: () => void
  [CompileError]: () => void
}
Severity: Major
Found in packages/build/src/services/compiler.ts and 3 other locations - About 50 mins to fix
packages/build/src/services/bundler/lambda.ts on lines 9..13
packages/build/src/services/bundler/server.ts on lines 9..13
packages/build/src/services/bundler/vendor.ts on lines 10..14

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

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

export interface VendorBundleServiceEvents extends OutputServiceEvents {
  [BundleVendorEvent]: VendorBundleService['handleStartBundling']
  [BundledVendorEvent]: () => void
  [BundleVendorErrorEvent]: () => void
}
Severity: Major
Found in packages/build/src/services/bundler/vendor.ts and 3 other locations - About 50 mins to fix
packages/build/src/services/bundler/lambda.ts on lines 9..13
packages/build/src/services/bundler/server.ts on lines 9..13
packages/build/src/services/compiler.ts on lines 8..12

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

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

  constructor() {
    const { credentials, region } = config
    this.cloudfront = new CloudFront({ credentials, region })
  }
Severity: Major
Found in packages/deploy-aws/src/aws_sdk_handler/handle_cloudfront.ts and 3 other locations - About 50 mins to fix
packages/deploy-aws/src/aws_sdk_handler/handle_s3.ts on lines 10..13
packages/deploy-aws/src/aws_sdk_handler/handle_ssm.ts on lines 27..30
packages/deploy-aws/src/aws_sdk_handler/handle_sts.ts on lines 10..13

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

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

  constructor() {
    const { credentials, region } = config
    this.sts = new STS({ credentials, region })
  }
Severity: Major
Found in packages/deploy-aws/src/aws_sdk_handler/handle_sts.ts and 3 other locations - About 50 mins to fix
packages/deploy-aws/src/aws_sdk_handler/handle_cloudfront.ts on lines 12..15
packages/deploy-aws/src/aws_sdk_handler/handle_s3.ts on lines 10..13
packages/deploy-aws/src/aws_sdk_handler/handle_ssm.ts on lines 27..30

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

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

  constructor() {
    const { credentials, region } = config
    this.ssm = new SSM({ credentials, region })
  }
Severity: Major
Found in packages/deploy-aws/src/aws_sdk_handler/handle_ssm.ts and 3 other locations - About 50 mins to fix
packages/deploy-aws/src/aws_sdk_handler/handle_cloudfront.ts on lines 12..15
packages/deploy-aws/src/aws_sdk_handler/handle_s3.ts on lines 10..13
packages/deploy-aws/src/aws_sdk_handler/handle_sts.ts on lines 10..13

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

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

export interface ServerBundleServiceEvents extends OutputServiceEvents {
  [BundleServerEvent]: ServerBundleService['handleStartBundling']
  [BundledServerEvent]: () => void
  [BundleServerErrorEvent]: () => void
}
Severity: Major
Found in packages/build/src/services/bundler/server.ts and 3 other locations - About 50 mins to fix
packages/build/src/services/bundler/lambda.ts on lines 9..13
packages/build/src/services/bundler/vendor.ts on lines 10..14
packages/build/src/services/compiler.ts on lines 8..12

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

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

export interface LambdaBundleServiceEvents extends OutputServiceEvents {
  [BundleLambdaEvent]: LambdaBundleService['handleStartBundling']
  [BundledLambdaEvent]: () => void
  [BundleLambdaErrorEvent]: () => void
}
Severity: Major
Found in packages/build/src/services/bundler/lambda.ts and 3 other locations - About 50 mins to fix
packages/build/src/services/bundler/server.ts on lines 9..13
packages/build/src/services/bundler/vendor.ts on lines 10..14
packages/build/src/services/compiler.ts on lines 8..12

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

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

  constructor(from: string, to: string) {
    super()
    this.filePathFrom = from
    this.filePathTo = to
  }
Severity: Major
Found in packages/commands-fs/src/copy_file.ts and 4 other locations - About 45 mins to fix
packages/commands-fs/src/copy_folder.ts on lines 33..37
packages/commands-fs/src/write_file.ts on lines 34..38
packages/commands-s3/src/delete_file.ts on lines 33..37
packages/commands-s3/src/read_file.ts on lines 29..33

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

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

  constructor(bucketName: string, filePath: string) {
    super()
    this.bucketName = bucketName
    this.filePath = filePath
  }
Severity: Major
Found in packages/commands-s3/src/delete_file.ts and 4 other locations - About 45 mins to fix
packages/commands-fs/src/copy_file.ts on lines 31..35
packages/commands-fs/src/copy_folder.ts on lines 33..37
packages/commands-fs/src/write_file.ts on lines 34..38
packages/commands-s3/src/read_file.ts on lines 29..33

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

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

  constructor(bucketName: string, filePath: string) {
    super()
    this.bucketName = bucketName
    this.filePath = filePath
  }
Severity: Major
Found in packages/commands-s3/src/read_file.ts and 4 other locations - About 45 mins to fix
packages/commands-fs/src/copy_file.ts on lines 31..35
packages/commands-fs/src/copy_folder.ts on lines 33..37
packages/commands-fs/src/write_file.ts on lines 34..38
packages/commands-s3/src/delete_file.ts on lines 33..37

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

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

  constructor(filePath: string, content: string) {
    super()
    this.content = content
    this.filePath = filePath
  }
Severity: Major
Found in packages/commands-fs/src/write_file.ts and 4 other locations - About 45 mins to fix
packages/commands-fs/src/copy_file.ts on lines 31..35
packages/commands-fs/src/copy_folder.ts on lines 33..37
packages/commands-s3/src/delete_file.ts on lines 33..37
packages/commands-s3/src/read_file.ts on lines 29..33

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

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

  constructor(from: string, to: string) {
    super()
    this.folderPathFrom = from
    this.folderPathTo = to
  }
Severity: Major
Found in packages/commands-fs/src/copy_folder.ts and 4 other locations - About 45 mins to fix
packages/commands-fs/src/copy_file.ts on lines 31..35
packages/commands-fs/src/write_file.ts on lines 34..38
packages/commands-s3/src/delete_file.ts on lines 33..37
packages/commands-s3/src/read_file.ts on lines 29..33

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

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

export default class TicTacToe extends Route {
  static path = '/async-fetching/mobx'
  static async handler(this: RouteContext) {
    this.render('AsyncFetchingMobx', {
      initialData: 'this will change after you click the button above',
Severity: Major
Found in examples/helloworld/src/routes/async_fetching_mobx.ts and 3 other locations - About 40 mins to fix
examples/helloworld/src/routes/async_fetching.ts on lines 3..10
examples/helloworld/src/routes/page_route.ts on lines 3..8
examples/helloworld/src/routes/vendor_bundle_includes.ts on lines 3..8

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language