IBM/scc-node-sdk

View on GitHub

Showing 159 of 159 total issues

SecurityAndComplianceCenterApiV3 has 47 functions (exceeds 20 allowed). Consider refactoring.
Open

class SecurityAndComplianceCenterApiV3 extends BaseService {
  static DEFAULT_SERVICE_URL: string = 'https://us-south.compliance.cloud.ibm.com/instances/instance_id/v3';

  static DEFAULT_SERVICE_NAME: string = 'security_and_compliance_center_api';

Severity: Minor
Found in security-and-compliance-center-api/v3.ts - About 6 hrs to fix

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

      export interface EvaluationPage {
        /** The total number of resources that are in the collection. */
        total_count: number;
        /** The requested page limi.t. */
        limit: number;
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 1 other location - About 3 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 5427..5444

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

    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

      export interface ResourcePage {
        /** The total number of resources that are in the collection. */
        total_count: number;
        /** The requested page limi.t. */
        limit: number;
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 1 other location - About 3 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 4884..4901

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

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

        const parameters = {
          options: {
            url: '/provider_types/{provider_type_id}/provider_type_instances',
            method: 'POST',
            body,
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 5 other locations - About 3 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 692..712
    security-and-compliance-center-api/v3.ts on lines 1043..1063
    security-and-compliance-center-api/v3.ts on lines 1556..1576
    security-and-compliance-center-api/v3.ts on lines 1794..1814
    security-and-compliance-center-api/v3.ts on lines 3173..3193

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 97.

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

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

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

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

    Refactorings

    Further Reading

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

        const parameters = {
          options: {
            url: '/control_libraries/{control_libraries_id}',
            method: 'PUT',
            body,
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 5 other locations - About 3 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 1043..1063
    security-and-compliance-center-api/v3.ts on lines 1556..1576
    security-and-compliance-center-api/v3.ts on lines 1794..1814
    security-and-compliance-center-api/v3.ts on lines 2971..2991
    security-and-compliance-center-api/v3.ts on lines 3173..3193

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 97.

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

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

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

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

    Refactorings

    Further Reading

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

        const parameters = {
          options: {
            url: '/profiles/{profiles_id}/attachments',
            method: 'POST',
            body,
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 5 other locations - About 3 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 692..712
    security-and-compliance-center-api/v3.ts on lines 1043..1063
    security-and-compliance-center-api/v3.ts on lines 1794..1814
    security-and-compliance-center-api/v3.ts on lines 2971..2991
    security-and-compliance-center-api/v3.ts on lines 3173..3193

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 97.

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

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

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

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

    Refactorings

    Further Reading

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

        const parameters = {
          options: {
            url: '/profiles/{profiles_id}/attachments/{attachment_id}',
            method: 'PUT',
            body,
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 5 other locations - About 3 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 692..712
    security-and-compliance-center-api/v3.ts on lines 1043..1063
    security-and-compliance-center-api/v3.ts on lines 1556..1576
    security-and-compliance-center-api/v3.ts on lines 2971..2991
    security-and-compliance-center-api/v3.ts on lines 3173..3193

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 97.

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

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

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

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

    Refactorings

    Further Reading

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

        const parameters = {
          options: {
            url: '/provider_types/{provider_type_id}/provider_type_instances/{provider_type_instance_id}',
            method: 'PATCH',
            body,
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 5 other locations - About 3 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 692..712
    security-and-compliance-center-api/v3.ts on lines 1043..1063
    security-and-compliance-center-api/v3.ts on lines 1556..1576
    security-and-compliance-center-api/v3.ts on lines 1794..1814
    security-and-compliance-center-api/v3.ts on lines 2971..2991

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 97.

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

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

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

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

    Refactorings

    Further Reading

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

        const parameters = {
          options: {
            url: '/profiles/{profiles_id}',
            method: 'PUT',
            body,
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 5 other locations - About 3 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 692..712
    security-and-compliance-center-api/v3.ts on lines 1556..1576
    security-and-compliance-center-api/v3.ts on lines 1794..1814
    security-and-compliance-center-api/v3.ts on lines 2971..2991
    security-and-compliance-center-api/v3.ts on lines 3173..3193

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 97.

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

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

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

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

    Refactorings

    Further Reading

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

        const parameters = {
          options: {
            url: '/scans',
            method: 'POST',
            body,
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 4 other locations - About 2 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 231..250
    security-and-compliance-center-api/v3.ts on lines 451..470
    security-and-compliance-center-api/v3.ts on lines 836..855
    security-and-compliance-center-api/v3.ts on lines 1193..1212

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

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

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

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

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

    Refactorings

    Further Reading

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

        const parameters = {
          options: {
            url: '/reports/{report_id}/controls',
            method: 'GET',
            qs: query,
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 4 other locations - About 2 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 1484..1503
    security-and-compliance-center-api/v3.ts on lines 2493..2512
    security-and-compliance-center-api/v3.ts on lines 2578..2597
    security-and-compliance-center-api/v3.ts on lines 2710..2729

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

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

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

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

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

    Refactorings

    Further Reading

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

        const parameters = {
          options: {
            url: '/settings',
            method: 'PATCH',
            body,
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 4 other locations - About 2 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 451..470
    security-and-compliance-center-api/v3.ts on lines 836..855
    security-and-compliance-center-api/v3.ts on lines 1193..1212
    security-and-compliance-center-api/v3.ts on lines 1858..1877

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

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

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

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

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

    Refactorings

    Further Reading

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

        const parameters = {
          options: {
            url: '/profiles',
            method: 'POST',
            body,
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 4 other locations - About 2 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 231..250
    security-and-compliance-center-api/v3.ts on lines 451..470
    security-and-compliance-center-api/v3.ts on lines 1193..1212
    security-and-compliance-center-api/v3.ts on lines 1858..1877

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

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

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

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

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

    Refactorings

    Further Reading

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

        const parameters = {
          options: {
            url: '/rules',
            method: 'POST',
            body,
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 4 other locations - About 2 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 231..250
    security-and-compliance-center-api/v3.ts on lines 451..470
    security-and-compliance-center-api/v3.ts on lines 836..855
    security-and-compliance-center-api/v3.ts on lines 1858..1877

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

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

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

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

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

    Refactorings

    Further Reading

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

        const parameters = {
          options: {
            url: '/reports/{report_id}/violations_drift',
            method: 'GET',
            qs: query,
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 4 other locations - About 2 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 1484..1503
    security-and-compliance-center-api/v3.ts on lines 2346..2365
    security-and-compliance-center-api/v3.ts on lines 2493..2512
    security-and-compliance-center-api/v3.ts on lines 2578..2597

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

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

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

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

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

    Refactorings

    Further Reading

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

        const parameters = {
          options: {
            url: '/reports/{report_id}/evaluations',
            method: 'GET',
            qs: query,
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 4 other locations - About 2 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 1484..1503
    security-and-compliance-center-api/v3.ts on lines 2346..2365
    security-and-compliance-center-api/v3.ts on lines 2578..2597
    security-and-compliance-center-api/v3.ts on lines 2710..2729

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

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

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

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

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

    Refactorings

    Further Reading

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

        const parameters = {
          options: {
            url: '/control_libraries',
            method: 'POST',
            body,
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 4 other locations - About 2 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 231..250
    security-and-compliance-center-api/v3.ts on lines 836..855
    security-and-compliance-center-api/v3.ts on lines 1193..1212
    security-and-compliance-center-api/v3.ts on lines 1858..1877

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

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

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

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

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

    Refactorings

    Further Reading

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

        const parameters = {
          options: {
            url: '/profiles/{profiles_id}/attachments',
            method: 'GET',
            qs: query,
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 4 other locations - About 2 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 2346..2365
    security-and-compliance-center-api/v3.ts on lines 2493..2512
    security-and-compliance-center-api/v3.ts on lines 2578..2597
    security-and-compliance-center-api/v3.ts on lines 2710..2729

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

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

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

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

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

    Refactorings

    Further Reading

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

        const parameters = {
          options: {
            url: '/reports/{report_id}/resources',
            method: 'GET',
            qs: query,
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 4 other locations - About 2 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 1484..1503
    security-and-compliance-center-api/v3.ts on lines 2346..2365
    security-and-compliance-center-api/v3.ts on lines 2493..2512
    security-and-compliance-center-api/v3.ts on lines 2710..2729

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

    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

        const parameters = {
          options: {
            url: '/provider_types/{provider_type_id}/provider_type_instances/{provider_type_instance_id}',
            method: 'DELETE',
            path,
    Severity: Major
    Found in security-and-compliance-center-api/v3.ts and 1 other location - About 2 hrs to fix
    security-and-compliance-center-api/v3.ts on lines 1257..1274

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

    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