udondan/iam-floyd

View on GitHub

Showing 60 of 99 total issues

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

  public ifAwsPrincipalOrgPaths(
    value: string | string[],
    operator?: Operator | string,
  ) {
    return this.if('aws:PrincipalOrgPaths', value, operator);
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 148..153
lib/shared/policy-statement/2-conditions.ts on lines 165..170
lib/shared/policy-statement/2-conditions.ts on lines 217..222
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 347..352
lib/shared/policy-statement/2-conditions.ts on lines 402..407
lib/shared/policy-statement/2-conditions.ts on lines 513..518
lib/shared/policy-statement/2-conditions.ts on lines 534..536
lib/shared/policy-statement/2-conditions.ts on lines 552..557
lib/shared/policy-statement/2-conditions.ts on lines 610..615
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 675..680
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 774..779
lib/shared/policy-statement/2-conditions.ts on lines 807..812
lib/shared/policy-statement/2-conditions.ts on lines 824..829
lib/shared/policy-statement/2-conditions.ts on lines 845..847
lib/shared/policy-statement/2-conditions.ts on lines 884..889
lib/shared/policy-statement/2-conditions.ts on lines 901..903
lib/shared/policy-statement/2-conditions.ts on lines 915..917

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

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

  public ifAwsUserid(value: string | string[], operator?: Operator | string) {
    return this.if('aws:userid', value, operator);
  }
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 148..153
lib/shared/policy-statement/2-conditions.ts on lines 165..170
lib/shared/policy-statement/2-conditions.ts on lines 217..222
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 347..352
lib/shared/policy-statement/2-conditions.ts on lines 402..407
lib/shared/policy-statement/2-conditions.ts on lines 425..430
lib/shared/policy-statement/2-conditions.ts on lines 513..518
lib/shared/policy-statement/2-conditions.ts on lines 534..536
lib/shared/policy-statement/2-conditions.ts on lines 552..557
lib/shared/policy-statement/2-conditions.ts on lines 610..615
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 675..680
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 774..779
lib/shared/policy-statement/2-conditions.ts on lines 807..812
lib/shared/policy-statement/2-conditions.ts on lines 824..829
lib/shared/policy-statement/2-conditions.ts on lines 845..847
lib/shared/policy-statement/2-conditions.ts on lines 884..889
lib/shared/policy-statement/2-conditions.ts on lines 915..917

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

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

  public ifAwsSourceVpce(
    value: string | string[],
    operator?: Operator | string,
  ) {
    return this.if('aws:SourceVpce', value, operator);
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 148..153
lib/shared/policy-statement/2-conditions.ts on lines 165..170
lib/shared/policy-statement/2-conditions.ts on lines 217..222
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 347..352
lib/shared/policy-statement/2-conditions.ts on lines 402..407
lib/shared/policy-statement/2-conditions.ts on lines 425..430
lib/shared/policy-statement/2-conditions.ts on lines 513..518
lib/shared/policy-statement/2-conditions.ts on lines 534..536
lib/shared/policy-statement/2-conditions.ts on lines 552..557
lib/shared/policy-statement/2-conditions.ts on lines 610..615
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 675..680
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 774..779
lib/shared/policy-statement/2-conditions.ts on lines 807..812
lib/shared/policy-statement/2-conditions.ts on lines 845..847
lib/shared/policy-statement/2-conditions.ts on lines 884..889
lib/shared/policy-statement/2-conditions.ts on lines 901..903
lib/shared/policy-statement/2-conditions.ts on lines 915..917

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

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

  public ifAwsPrincipalType(
    value: string | string[],
    operator?: Operator | string,
  ) {
    return this.if('aws:PrincipalType', value, operator);
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 148..153
lib/shared/policy-statement/2-conditions.ts on lines 165..170
lib/shared/policy-statement/2-conditions.ts on lines 217..222
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 347..352
lib/shared/policy-statement/2-conditions.ts on lines 402..407
lib/shared/policy-statement/2-conditions.ts on lines 425..430
lib/shared/policy-statement/2-conditions.ts on lines 534..536
lib/shared/policy-statement/2-conditions.ts on lines 552..557
lib/shared/policy-statement/2-conditions.ts on lines 610..615
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 675..680
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 774..779
lib/shared/policy-statement/2-conditions.ts on lines 807..812
lib/shared/policy-statement/2-conditions.ts on lines 824..829
lib/shared/policy-statement/2-conditions.ts on lines 845..847
lib/shared/policy-statement/2-conditions.ts on lines 884..889
lib/shared/policy-statement/2-conditions.ts on lines 901..903
lib/shared/policy-statement/2-conditions.ts on lines 915..917

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

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

  public ifAwsCalledViaLast(
    value: string | string[],
    operator?: Operator | string,
  ) {
    return this.if('aws:CalledViaLast', value, operator);
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 148..153
lib/shared/policy-statement/2-conditions.ts on lines 217..222
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 347..352
lib/shared/policy-statement/2-conditions.ts on lines 402..407
lib/shared/policy-statement/2-conditions.ts on lines 425..430
lib/shared/policy-statement/2-conditions.ts on lines 513..518
lib/shared/policy-statement/2-conditions.ts on lines 534..536
lib/shared/policy-statement/2-conditions.ts on lines 552..557
lib/shared/policy-statement/2-conditions.ts on lines 610..615
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 675..680
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 774..779
lib/shared/policy-statement/2-conditions.ts on lines 807..812
lib/shared/policy-statement/2-conditions.ts on lines 824..829
lib/shared/policy-statement/2-conditions.ts on lines 845..847
lib/shared/policy-statement/2-conditions.ts on lines 884..889
lib/shared/policy-statement/2-conditions.ts on lines 901..903
lib/shared/policy-statement/2-conditions.ts on lines 915..917

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

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

  public ifAwsResourceOrgPaths(
    value: string | string[],
    operator?: Operator | string,
  ) {
    return this.if('aws:ResourceOrgPaths', value, operator);
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 148..153
lib/shared/policy-statement/2-conditions.ts on lines 165..170
lib/shared/policy-statement/2-conditions.ts on lines 217..222
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 347..352
lib/shared/policy-statement/2-conditions.ts on lines 402..407
lib/shared/policy-statement/2-conditions.ts on lines 425..430
lib/shared/policy-statement/2-conditions.ts on lines 513..518
lib/shared/policy-statement/2-conditions.ts on lines 534..536
lib/shared/policy-statement/2-conditions.ts on lines 552..557
lib/shared/policy-statement/2-conditions.ts on lines 610..615
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 774..779
lib/shared/policy-statement/2-conditions.ts on lines 807..812
lib/shared/policy-statement/2-conditions.ts on lines 824..829
lib/shared/policy-statement/2-conditions.ts on lines 845..847
lib/shared/policy-statement/2-conditions.ts on lines 884..889
lib/shared/policy-statement/2-conditions.ts on lines 901..903
lib/shared/policy-statement/2-conditions.ts on lines 915..917

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

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

  public ifAwsUsername(value: string | string[], operator?: Operator | string) {
    return this.if('aws:username', value, operator);
  }
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 148..153
lib/shared/policy-statement/2-conditions.ts on lines 165..170
lib/shared/policy-statement/2-conditions.ts on lines 217..222
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 347..352
lib/shared/policy-statement/2-conditions.ts on lines 402..407
lib/shared/policy-statement/2-conditions.ts on lines 425..430
lib/shared/policy-statement/2-conditions.ts on lines 513..518
lib/shared/policy-statement/2-conditions.ts on lines 534..536
lib/shared/policy-statement/2-conditions.ts on lines 552..557
lib/shared/policy-statement/2-conditions.ts on lines 610..615
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 675..680
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 774..779
lib/shared/policy-statement/2-conditions.ts on lines 807..812
lib/shared/policy-statement/2-conditions.ts on lines 824..829
lib/shared/policy-statement/2-conditions.ts on lines 845..847
lib/shared/policy-statement/2-conditions.ts on lines 884..889
lib/shared/policy-statement/2-conditions.ts on lines 901..903

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

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

  public ifAwsUserAgent(
    value: string | string[],
    operator?: Operator | string,
  ) {
    return this.if('aws:UserAgent', value, operator);
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 148..153
lib/shared/policy-statement/2-conditions.ts on lines 165..170
lib/shared/policy-statement/2-conditions.ts on lines 217..222
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 347..352
lib/shared/policy-statement/2-conditions.ts on lines 402..407
lib/shared/policy-statement/2-conditions.ts on lines 425..430
lib/shared/policy-statement/2-conditions.ts on lines 513..518
lib/shared/policy-statement/2-conditions.ts on lines 534..536
lib/shared/policy-statement/2-conditions.ts on lines 552..557
lib/shared/policy-statement/2-conditions.ts on lines 610..615
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 675..680
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 774..779
lib/shared/policy-statement/2-conditions.ts on lines 807..812
lib/shared/policy-statement/2-conditions.ts on lines 824..829
lib/shared/policy-statement/2-conditions.ts on lines 845..847
lib/shared/policy-statement/2-conditions.ts on lines 901..903
lib/shared/policy-statement/2-conditions.ts on lines 915..917

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

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

  public ifAwsResourceAccount(
    value: string | string[],
    operator?: Operator | string,
  ) {
    return this.if('aws:ResourceAccount', value, operator);
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 148..153
lib/shared/policy-statement/2-conditions.ts on lines 165..170
lib/shared/policy-statement/2-conditions.ts on lines 217..222
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 347..352
lib/shared/policy-statement/2-conditions.ts on lines 402..407
lib/shared/policy-statement/2-conditions.ts on lines 425..430
lib/shared/policy-statement/2-conditions.ts on lines 513..518
lib/shared/policy-statement/2-conditions.ts on lines 534..536
lib/shared/policy-statement/2-conditions.ts on lines 552..557
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 675..680
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 774..779
lib/shared/policy-statement/2-conditions.ts on lines 807..812
lib/shared/policy-statement/2-conditions.ts on lines 824..829
lib/shared/policy-statement/2-conditions.ts on lines 845..847
lib/shared/policy-statement/2-conditions.ts on lines 884..889
lib/shared/policy-statement/2-conditions.ts on lines 901..903
lib/shared/policy-statement/2-conditions.ts on lines 915..917

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

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

        if (!('relatedActions' in module.conditions![condition])) {
          module.conditions![condition].relatedActions = [];
        }
Severity: Minor
Found in lib/generator/index.ts and 1 other location - About 30 mins to fix
lib/generator/index.ts on lines 921..923

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

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

  public ifAwsPrincipalAccount(
    value: string | string[],
    operator?: Operator | string,
  ) {
    return this.if('aws:PrincipalAccount', value, operator);
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 148..153
lib/shared/policy-statement/2-conditions.ts on lines 165..170
lib/shared/policy-statement/2-conditions.ts on lines 217..222
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 402..407
lib/shared/policy-statement/2-conditions.ts on lines 425..430
lib/shared/policy-statement/2-conditions.ts on lines 513..518
lib/shared/policy-statement/2-conditions.ts on lines 534..536
lib/shared/policy-statement/2-conditions.ts on lines 552..557
lib/shared/policy-statement/2-conditions.ts on lines 610..615
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 675..680
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 774..779
lib/shared/policy-statement/2-conditions.ts on lines 807..812
lib/shared/policy-statement/2-conditions.ts on lines 824..829
lib/shared/policy-statement/2-conditions.ts on lines 845..847
lib/shared/policy-statement/2-conditions.ts on lines 884..889
lib/shared/policy-statement/2-conditions.ts on lines 901..903
lib/shared/policy-statement/2-conditions.ts on lines 915..917

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

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

  public ifAwsPrincipalOrgID(
    value: string | string[],
    operator?: Operator | string,
  ) {
    return this.if('aws:PrincipalOrgID', value, operator);
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 148..153
lib/shared/policy-statement/2-conditions.ts on lines 165..170
lib/shared/policy-statement/2-conditions.ts on lines 217..222
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 347..352
lib/shared/policy-statement/2-conditions.ts on lines 425..430
lib/shared/policy-statement/2-conditions.ts on lines 513..518
lib/shared/policy-statement/2-conditions.ts on lines 534..536
lib/shared/policy-statement/2-conditions.ts on lines 552..557
lib/shared/policy-statement/2-conditions.ts on lines 610..615
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 675..680
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 774..779
lib/shared/policy-statement/2-conditions.ts on lines 807..812
lib/shared/policy-statement/2-conditions.ts on lines 824..829
lib/shared/policy-statement/2-conditions.ts on lines 845..847
lib/shared/policy-statement/2-conditions.ts on lines 884..889
lib/shared/policy-statement/2-conditions.ts on lines 901..903
lib/shared/policy-statement/2-conditions.ts on lines 915..917

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

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

  public ifAwsTagKeys(value: string | string[], operator?: Operator | string) {
    return this.if('aws:TagKeys', value, operator);
  }
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 148..153
lib/shared/policy-statement/2-conditions.ts on lines 165..170
lib/shared/policy-statement/2-conditions.ts on lines 217..222
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 347..352
lib/shared/policy-statement/2-conditions.ts on lines 402..407
lib/shared/policy-statement/2-conditions.ts on lines 425..430
lib/shared/policy-statement/2-conditions.ts on lines 513..518
lib/shared/policy-statement/2-conditions.ts on lines 534..536
lib/shared/policy-statement/2-conditions.ts on lines 552..557
lib/shared/policy-statement/2-conditions.ts on lines 610..615
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 675..680
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 774..779
lib/shared/policy-statement/2-conditions.ts on lines 807..812
lib/shared/policy-statement/2-conditions.ts on lines 824..829
lib/shared/policy-statement/2-conditions.ts on lines 884..889
lib/shared/policy-statement/2-conditions.ts on lines 901..903
lib/shared/policy-statement/2-conditions.ts on lines 915..917

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

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

  public ifAwsSourceVpc(
    value: string | string[],
    operator?: Operator | string,
  ) {
    return this.if('aws:SourceVpc', value, operator);
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 148..153
lib/shared/policy-statement/2-conditions.ts on lines 165..170
lib/shared/policy-statement/2-conditions.ts on lines 217..222
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 347..352
lib/shared/policy-statement/2-conditions.ts on lines 402..407
lib/shared/policy-statement/2-conditions.ts on lines 425..430
lib/shared/policy-statement/2-conditions.ts on lines 513..518
lib/shared/policy-statement/2-conditions.ts on lines 534..536
lib/shared/policy-statement/2-conditions.ts on lines 552..557
lib/shared/policy-statement/2-conditions.ts on lines 610..615
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 675..680
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 774..779
lib/shared/policy-statement/2-conditions.ts on lines 824..829
lib/shared/policy-statement/2-conditions.ts on lines 845..847
lib/shared/policy-statement/2-conditions.ts on lines 884..889
lib/shared/policy-statement/2-conditions.ts on lines 901..903
lib/shared/policy-statement/2-conditions.ts on lines 915..917

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

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

      if (!('relatedResourceTypes' in module.conditions![condition])) {
        module.conditions![condition].relatedResourceTypes = [];
      }
Severity: Minor
Found in lib/generator/index.ts and 1 other location - About 30 mins to fix
lib/generator/index.ts on lines 855..857

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

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

  public ifAwsCalledViaFirst(
    value: string | string[],
    operator?: Operator | string,
  ) {
    return this.if('aws:CalledViaFirst', value, operator);
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 165..170
lib/shared/policy-statement/2-conditions.ts on lines 217..222
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 347..352
lib/shared/policy-statement/2-conditions.ts on lines 402..407
lib/shared/policy-statement/2-conditions.ts on lines 425..430
lib/shared/policy-statement/2-conditions.ts on lines 513..518
lib/shared/policy-statement/2-conditions.ts on lines 534..536
lib/shared/policy-statement/2-conditions.ts on lines 552..557
lib/shared/policy-statement/2-conditions.ts on lines 610..615
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 675..680
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 774..779
lib/shared/policy-statement/2-conditions.ts on lines 807..812
lib/shared/policy-statement/2-conditions.ts on lines 824..829
lib/shared/policy-statement/2-conditions.ts on lines 845..847
lib/shared/policy-statement/2-conditions.ts on lines 884..889
lib/shared/policy-statement/2-conditions.ts on lines 901..903
lib/shared/policy-statement/2-conditions.ts on lines 915..917

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

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

  public ifAwsSourceIdentity(
    value: string | string[],
    operator?: Operator | string,
  ) {
    return this.if('aws:SourceIdentity', value, operator);
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 148..153
lib/shared/policy-statement/2-conditions.ts on lines 165..170
lib/shared/policy-statement/2-conditions.ts on lines 217..222
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 347..352
lib/shared/policy-statement/2-conditions.ts on lines 402..407
lib/shared/policy-statement/2-conditions.ts on lines 425..430
lib/shared/policy-statement/2-conditions.ts on lines 513..518
lib/shared/policy-statement/2-conditions.ts on lines 534..536
lib/shared/policy-statement/2-conditions.ts on lines 552..557
lib/shared/policy-statement/2-conditions.ts on lines 610..615
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 675..680
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 807..812
lib/shared/policy-statement/2-conditions.ts on lines 824..829
lib/shared/policy-statement/2-conditions.ts on lines 845..847
lib/shared/policy-statement/2-conditions.ts on lines 884..889
lib/shared/policy-statement/2-conditions.ts on lines 901..903
lib/shared/policy-statement/2-conditions.ts on lines 915..917

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

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

  public ifAwsEc2InstanceSourceVpc(
    value: string | string[],
    operator?: Operator | string,
  ) {
    return this.if('aws:Ec2InstanceSourceVpc', value, operator);
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 148..153
lib/shared/policy-statement/2-conditions.ts on lines 165..170
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 347..352
lib/shared/policy-statement/2-conditions.ts on lines 402..407
lib/shared/policy-statement/2-conditions.ts on lines 425..430
lib/shared/policy-statement/2-conditions.ts on lines 513..518
lib/shared/policy-statement/2-conditions.ts on lines 534..536
lib/shared/policy-statement/2-conditions.ts on lines 552..557
lib/shared/policy-statement/2-conditions.ts on lines 610..615
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 675..680
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 774..779
lib/shared/policy-statement/2-conditions.ts on lines 807..812
lib/shared/policy-statement/2-conditions.ts on lines 824..829
lib/shared/policy-statement/2-conditions.ts on lines 845..847
lib/shared/policy-statement/2-conditions.ts on lines 884..889
lib/shared/policy-statement/2-conditions.ts on lines 901..903
lib/shared/policy-statement/2-conditions.ts on lines 915..917

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

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

  public ifAwsReferer(value: string | string[], operator?: Operator | string) {
    return this.if('aws:Referer', value, operator);
  }
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 148..153
lib/shared/policy-statement/2-conditions.ts on lines 165..170
lib/shared/policy-statement/2-conditions.ts on lines 217..222
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 347..352
lib/shared/policy-statement/2-conditions.ts on lines 402..407
lib/shared/policy-statement/2-conditions.ts on lines 425..430
lib/shared/policy-statement/2-conditions.ts on lines 513..518
lib/shared/policy-statement/2-conditions.ts on lines 552..557
lib/shared/policy-statement/2-conditions.ts on lines 610..615
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 675..680
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 774..779
lib/shared/policy-statement/2-conditions.ts on lines 807..812
lib/shared/policy-statement/2-conditions.ts on lines 824..829
lib/shared/policy-statement/2-conditions.ts on lines 845..847
lib/shared/policy-statement/2-conditions.ts on lines 884..889
lib/shared/policy-statement/2-conditions.ts on lines 901..903
lib/shared/policy-statement/2-conditions.ts on lines 915..917

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

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

  public ifAwsRequestedRegion(
    value: string | string[],
    operator?: Operator | string,
  ) {
    return this.if('aws:RequestedRegion', value, operator);
Severity: Major
Found in lib/shared/policy-statement/2-conditions.ts and 20 other locations - About 30 mins to fix
lib/shared/policy-statement/2-conditions.ts on lines 148..153
lib/shared/policy-statement/2-conditions.ts on lines 165..170
lib/shared/policy-statement/2-conditions.ts on lines 217..222
lib/shared/policy-statement/2-conditions.ts on lines 288..293
lib/shared/policy-statement/2-conditions.ts on lines 347..352
lib/shared/policy-statement/2-conditions.ts on lines 402..407
lib/shared/policy-statement/2-conditions.ts on lines 425..430
lib/shared/policy-statement/2-conditions.ts on lines 513..518
lib/shared/policy-statement/2-conditions.ts on lines 534..536
lib/shared/policy-statement/2-conditions.ts on lines 610..615
lib/shared/policy-statement/2-conditions.ts on lines 641..646
lib/shared/policy-statement/2-conditions.ts on lines 675..680
lib/shared/policy-statement/2-conditions.ts on lines 730..735
lib/shared/policy-statement/2-conditions.ts on lines 774..779
lib/shared/policy-statement/2-conditions.ts on lines 807..812
lib/shared/policy-statement/2-conditions.ts on lines 824..829
lib/shared/policy-statement/2-conditions.ts on lines 845..847
lib/shared/policy-statement/2-conditions.ts on lines 884..889
lib/shared/policy-statement/2-conditions.ts on lines 901..903
lib/shared/policy-statement/2-conditions.ts on lines 915..917

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

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