IBM/scc-node-sdk

View on GitHub

Showing 159 of 159 total issues

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

  public getReportTags(
    params: SecurityAndComplianceCenterApiV3.GetReportTagsParams
  ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ReportTags>> {
    const _params = { ...params };
    const _requiredParams = ['reportId'];
Severity: Major
Found in security-and-compliance-center-api/v3.ts and 7 other locations - About 1 day to fix
security-and-compliance-center-api/v3.ts on lines 498..540
security-and-compliance-center-api/v3.ts on lines 567..609
security-and-compliance-center-api/v3.ts on lines 880..922
security-and-compliance-center-api/v3.ts on lines 944..986
security-and-compliance-center-api/v3.ts on lines 1298..1340
security-and-compliance-center-api/v3.ts on lines 2113..2155
security-and-compliance-center-api/v3.ts on lines 2176..2218

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

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

  public getProfile(
    params: SecurityAndComplianceCenterApiV3.GetProfileParams
  ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Profile>> {
    const _params = { ...params };
    const _requiredParams = ['profilesId'];
Severity: Major
Found in security-and-compliance-center-api/v3.ts and 7 other locations - About 1 day to fix
security-and-compliance-center-api/v3.ts on lines 498..540
security-and-compliance-center-api/v3.ts on lines 567..609
security-and-compliance-center-api/v3.ts on lines 880..922
security-and-compliance-center-api/v3.ts on lines 1298..1340
security-and-compliance-center-api/v3.ts on lines 2113..2155
security-and-compliance-center-api/v3.ts on lines 2176..2218
security-and-compliance-center-api/v3.ts on lines 2621..2663

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

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

  public deleteCustomControlLibrary(
    params: SecurityAndComplianceCenterApiV3.DeleteCustomControlLibraryParams
  ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ControlLibraryDelete>> {
    const _params = { ...params };
    const _requiredParams = ['controlLibrariesId'];
Severity: Major
Found in security-and-compliance-center-api/v3.ts and 7 other locations - About 1 day to fix
security-and-compliance-center-api/v3.ts on lines 567..609
security-and-compliance-center-api/v3.ts on lines 880..922
security-and-compliance-center-api/v3.ts on lines 944..986
security-and-compliance-center-api/v3.ts on lines 1298..1340
security-and-compliance-center-api/v3.ts on lines 2113..2155
security-and-compliance-center-api/v3.ts on lines 2176..2218
security-and-compliance-center-api/v3.ts on lines 2621..2663

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

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

  public deleteCustomProfile(
    params: SecurityAndComplianceCenterApiV3.DeleteCustomProfileParams
  ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Profile>> {
    const _params = { ...params };
    const _requiredParams = ['profilesId'];
Severity: Major
Found in security-and-compliance-center-api/v3.ts and 7 other locations - About 1 day to fix
security-and-compliance-center-api/v3.ts on lines 498..540
security-and-compliance-center-api/v3.ts on lines 567..609
security-and-compliance-center-api/v3.ts on lines 944..986
security-and-compliance-center-api/v3.ts on lines 1298..1340
security-and-compliance-center-api/v3.ts on lines 2113..2155
security-and-compliance-center-api/v3.ts on lines 2176..2218
security-and-compliance-center-api/v3.ts on lines 2621..2663

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

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

  public getSettings(
    params?: SecurityAndComplianceCenterApiV3.GetSettingsParams
  ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Settings>> {
    const _params = { ...params };
    const _requiredParams = [];
Severity: Major
Found in security-and-compliance-center-api/v3.ts and 1 other location - About 1 day to fix
security-and-compliance-center-api/v3.ts on lines 2756..2793

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

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

  public listProviderTypes(
    params?: SecurityAndComplianceCenterApiV3.ListProviderTypesParams
  ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ProviderTypesCollection>> {
    const _params = { ...params };
    const _requiredParams = [];
Severity: Major
Found in security-and-compliance-center-api/v3.ts and 1 other location - About 1 day to fix
security-and-compliance-center-api/v3.ts on lines 151..188

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

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

  test('getProfileAttachment request example', async () => {
    consoleLogMock.mockImplementation((output) => {
      originalLog(output);
    });
    consoleWarnMock.mockImplementation((output) => {
Severity: Major
Found in examples/security-and-compliance-center-api.v3.test.js and 3 other locations - About 7 hrs to fix
examples/security-and-compliance-center-api.v3.test.js on lines 1557..1584
examples/security-and-compliance-center-api.v3.test.js on lines 1586..1613
examples/security-and-compliance-center-api.v3.test.js on lines 1639..1666

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

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

  test('updateProviderTypeInstance request example', async () => {
    consoleLogMock.mockImplementation((output) => {
      originalLog(output);
    });
    consoleWarnMock.mockImplementation((output) => {
Severity: Major
Found in examples/security-and-compliance-center-api.v3.test.js and 3 other locations - About 7 hrs to fix
examples/security-and-compliance-center-api.v3.test.js on lines 953..980
examples/security-and-compliance-center-api.v3.test.js on lines 1557..1584
examples/security-and-compliance-center-api.v3.test.js on lines 1639..1666

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

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

  test('deleteProfileAttachment request example', async () => {
    consoleLogMock.mockImplementation((output) => {
      originalLog(output);
    });
    consoleWarnMock.mockImplementation((output) => {
Severity: Major
Found in examples/security-and-compliance-center-api.v3.test.js and 3 other locations - About 7 hrs to fix
examples/security-and-compliance-center-api.v3.test.js on lines 953..980
examples/security-and-compliance-center-api.v3.test.js on lines 1557..1584
examples/security-and-compliance-center-api.v3.test.js on lines 1586..1613

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

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

  test('getProviderTypeInstance request example', async () => {
    consoleLogMock.mockImplementation((output) => {
      originalLog(output);
    });
    consoleWarnMock.mockImplementation((output) => {
Severity: Major
Found in examples/security-and-compliance-center-api.v3.test.js and 3 other locations - About 7 hrs to fix
examples/security-and-compliance-center-api.v3.test.js on lines 953..980
examples/security-and-compliance-center-api.v3.test.js on lines 1586..1613
examples/security-and-compliance-center-api.v3.test.js on lines 1639..1666

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

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

  test('getProfile request example', async () => {
    consoleLogMock.mockImplementation((output) => {
      originalLog(output);
    });
    consoleWarnMock.mockImplementation((output) => {
Severity: Major
Found in examples/security-and-compliance-center-api.v3.test.js and 9 other locations - About 7 hrs to fix
examples/security-and-compliance-center-api.v3.test.js on lines 454..480
examples/security-and-compliance-center-api.v3.test.js on lines 1163..1189
examples/security-and-compliance-center-api.v3.test.js on lines 1191..1217
examples/security-and-compliance-center-api.v3.test.js on lines 1389..1415
examples/security-and-compliance-center-api.v3.test.js on lines 1417..1443
examples/security-and-compliance-center-api.v3.test.js on lines 1471..1497
examples/security-and-compliance-center-api.v3.test.js on lines 1499..1525
examples/security-and-compliance-center-api.v3.test.js on lines 1668..1694
examples/security-and-compliance-center-api.v3.test.js on lines 1696..1722

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

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

  test('getReportSummary request example', async () => {
    consoleLogMock.mockImplementation((output) => {
      originalLog(output);
    });
    consoleWarnMock.mockImplementation((output) => {
Severity: Major
Found in examples/security-and-compliance-center-api.v3.test.js and 9 other locations - About 7 hrs to fix
examples/security-and-compliance-center-api.v3.test.js on lines 454..480
examples/security-and-compliance-center-api.v3.test.js on lines 650..676
examples/security-and-compliance-center-api.v3.test.js on lines 1163..1189
examples/security-and-compliance-center-api.v3.test.js on lines 1389..1415
examples/security-and-compliance-center-api.v3.test.js on lines 1417..1443
examples/security-and-compliance-center-api.v3.test.js on lines 1471..1497
examples/security-and-compliance-center-api.v3.test.js on lines 1499..1525
examples/security-and-compliance-center-api.v3.test.js on lines 1668..1694
examples/security-and-compliance-center-api.v3.test.js on lines 1696..1722

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

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

  test('listProviderTypeInstances request example', async () => {
    consoleLogMock.mockImplementation((output) => {
      originalLog(output);
    });
    consoleWarnMock.mockImplementation((output) => {
Severity: Major
Found in examples/security-and-compliance-center-api.v3.test.js and 9 other locations - About 7 hrs to fix
examples/security-and-compliance-center-api.v3.test.js on lines 454..480
examples/security-and-compliance-center-api.v3.test.js on lines 650..676
examples/security-and-compliance-center-api.v3.test.js on lines 1163..1189
examples/security-and-compliance-center-api.v3.test.js on lines 1191..1217
examples/security-and-compliance-center-api.v3.test.js on lines 1389..1415
examples/security-and-compliance-center-api.v3.test.js on lines 1417..1443
examples/security-and-compliance-center-api.v3.test.js on lines 1471..1497
examples/security-and-compliance-center-api.v3.test.js on lines 1668..1694
examples/security-and-compliance-center-api.v3.test.js on lines 1696..1722

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

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

  test('getReportTags request example', async () => {
    consoleLogMock.mockImplementation((output) => {
      originalLog(output);
    });
    consoleWarnMock.mockImplementation((output) => {
Severity: Major
Found in examples/security-and-compliance-center-api.v3.test.js and 9 other locations - About 7 hrs to fix
examples/security-and-compliance-center-api.v3.test.js on lines 454..480
examples/security-and-compliance-center-api.v3.test.js on lines 650..676
examples/security-and-compliance-center-api.v3.test.js on lines 1163..1189
examples/security-and-compliance-center-api.v3.test.js on lines 1191..1217
examples/security-and-compliance-center-api.v3.test.js on lines 1417..1443
examples/security-and-compliance-center-api.v3.test.js on lines 1471..1497
examples/security-and-compliance-center-api.v3.test.js on lines 1499..1525
examples/security-and-compliance-center-api.v3.test.js on lines 1668..1694
examples/security-and-compliance-center-api.v3.test.js on lines 1696..1722

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

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

  test('deleteCustomProfile request example', async () => {
    consoleLogMock.mockImplementation((output) => {
      originalLog(output);
    });
    consoleWarnMock.mockImplementation((output) => {
Severity: Major
Found in examples/security-and-compliance-center-api.v3.test.js and 9 other locations - About 7 hrs to fix
examples/security-and-compliance-center-api.v3.test.js on lines 454..480
examples/security-and-compliance-center-api.v3.test.js on lines 650..676
examples/security-and-compliance-center-api.v3.test.js on lines 1163..1189
examples/security-and-compliance-center-api.v3.test.js on lines 1191..1217
examples/security-and-compliance-center-api.v3.test.js on lines 1389..1415
examples/security-and-compliance-center-api.v3.test.js on lines 1417..1443
examples/security-and-compliance-center-api.v3.test.js on lines 1471..1497
examples/security-and-compliance-center-api.v3.test.js on lines 1499..1525
examples/security-and-compliance-center-api.v3.test.js on lines 1696..1722

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

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

  test('getReport request example', async () => {
    consoleLogMock.mockImplementation((output) => {
      originalLog(output);
    });
    consoleWarnMock.mockImplementation((output) => {
Severity: Major
Found in examples/security-and-compliance-center-api.v3.test.js and 9 other locations - About 7 hrs to fix
examples/security-and-compliance-center-api.v3.test.js on lines 454..480
examples/security-and-compliance-center-api.v3.test.js on lines 650..676
examples/security-and-compliance-center-api.v3.test.js on lines 1191..1217
examples/security-and-compliance-center-api.v3.test.js on lines 1389..1415
examples/security-and-compliance-center-api.v3.test.js on lines 1417..1443
examples/security-and-compliance-center-api.v3.test.js on lines 1471..1497
examples/security-and-compliance-center-api.v3.test.js on lines 1499..1525
examples/security-and-compliance-center-api.v3.test.js on lines 1668..1694
examples/security-and-compliance-center-api.v3.test.js on lines 1696..1722

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

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

  test('getProviderTypeById request example', async () => {
    consoleLogMock.mockImplementation((output) => {
      originalLog(output);
    });
    consoleWarnMock.mockImplementation((output) => {
Severity: Major
Found in examples/security-and-compliance-center-api.v3.test.js and 9 other locations - About 7 hrs to fix
examples/security-and-compliance-center-api.v3.test.js on lines 454..480
examples/security-and-compliance-center-api.v3.test.js on lines 650..676
examples/security-and-compliance-center-api.v3.test.js on lines 1163..1189
examples/security-and-compliance-center-api.v3.test.js on lines 1191..1217
examples/security-and-compliance-center-api.v3.test.js on lines 1389..1415
examples/security-and-compliance-center-api.v3.test.js on lines 1417..1443
examples/security-and-compliance-center-api.v3.test.js on lines 1499..1525
examples/security-and-compliance-center-api.v3.test.js on lines 1668..1694
examples/security-and-compliance-center-api.v3.test.js on lines 1696..1722

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

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

  test('deleteCustomControlLibrary request example', async () => {
    consoleLogMock.mockImplementation((output) => {
      originalLog(output);
    });
    consoleWarnMock.mockImplementation((output) => {
Severity: Major
Found in examples/security-and-compliance-center-api.v3.test.js and 9 other locations - About 7 hrs to fix
examples/security-and-compliance-center-api.v3.test.js on lines 454..480
examples/security-and-compliance-center-api.v3.test.js on lines 650..676
examples/security-and-compliance-center-api.v3.test.js on lines 1163..1189
examples/security-and-compliance-center-api.v3.test.js on lines 1191..1217
examples/security-and-compliance-center-api.v3.test.js on lines 1389..1415
examples/security-and-compliance-center-api.v3.test.js on lines 1417..1443
examples/security-and-compliance-center-api.v3.test.js on lines 1471..1497
examples/security-and-compliance-center-api.v3.test.js on lines 1499..1525
examples/security-and-compliance-center-api.v3.test.js on lines 1668..1694

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

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

  test('getControlLibrary request example', async () => {
    consoleLogMock.mockImplementation((output) => {
      originalLog(output);
    });
    consoleWarnMock.mockImplementation((output) => {
Severity: Major
Found in examples/security-and-compliance-center-api.v3.test.js and 9 other locations - About 7 hrs to fix
examples/security-and-compliance-center-api.v3.test.js on lines 650..676
examples/security-and-compliance-center-api.v3.test.js on lines 1163..1189
examples/security-and-compliance-center-api.v3.test.js on lines 1191..1217
examples/security-and-compliance-center-api.v3.test.js on lines 1389..1415
examples/security-and-compliance-center-api.v3.test.js on lines 1417..1443
examples/security-and-compliance-center-api.v3.test.js on lines 1471..1497
examples/security-and-compliance-center-api.v3.test.js on lines 1499..1525
examples/security-and-compliance-center-api.v3.test.js on lines 1668..1694
examples/security-and-compliance-center-api.v3.test.js on lines 1696..1722

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

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

  test('getReportViolationsDrift request example', async () => {
    consoleLogMock.mockImplementation((output) => {
      originalLog(output);
    });
    consoleWarnMock.mockImplementation((output) => {
Severity: Major
Found in examples/security-and-compliance-center-api.v3.test.js and 9 other locations - About 7 hrs to fix
examples/security-and-compliance-center-api.v3.test.js on lines 454..480
examples/security-and-compliance-center-api.v3.test.js on lines 650..676
examples/security-and-compliance-center-api.v3.test.js on lines 1163..1189
examples/security-and-compliance-center-api.v3.test.js on lines 1191..1217
examples/security-and-compliance-center-api.v3.test.js on lines 1389..1415
examples/security-and-compliance-center-api.v3.test.js on lines 1471..1497
examples/security-and-compliance-center-api.v3.test.js on lines 1499..1525
examples/security-and-compliance-center-api.v3.test.js on lines 1668..1694
examples/security-and-compliance-center-api.v3.test.js on lines 1696..1722

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

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