IBM/scc-node-sdk

View on GitHub

Showing 159 of 159 total issues

File v3.ts has 3368 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * (C) Copyright IBM Corp. 2023.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
Severity: Major
Found in security-and-compliance-center-api/v3.ts - About 1 wk to fix

    File security-and-compliance-center-api.v3.test.js has 1230 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * @jest-environment node
     */
    /**
     * (C) Copyright IBM Corp. 2023.
    Severity: Major
    Found in examples/security-and-compliance-center-api.v3.test.js - About 3 days to fix

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

        export class ReportEvaluationsPager {
          protected _hasNext: boolean;
          protected pageContext: any;
      
          protected client: SecurityAndComplianceCenterApiV3;
      Severity: Major
      Found in security-and-compliance-center-api/v3.ts and 1 other location - About 3 days to fix
      security-and-compliance-center-api/v3.ts on lines 6027..6105

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

      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 class ReportsPager {
          protected _hasNext: boolean;
          protected pageContext: any;
      
          protected client: SecurityAndComplianceCenterApiV3;
      Severity: Major
      Found in security-and-compliance-center-api/v3.ts and 1 other location - About 3 days to fix
      security-and-compliance-center-api/v3.ts on lines 6110..6188

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

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

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

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

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

      Refactorings

      Further Reading

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

        export class AttachmentsAccountPager {
          protected _hasNext: boolean;
          protected pageContext: any;
      
          protected client: SecurityAndComplianceCenterApiV3;
      Severity: Major
      Found in security-and-compliance-center-api/v3.ts and 2 other locations - About 2 days to fix
      security-and-compliance-center-api/v3.ts on lines 5784..5860
      security-and-compliance-center-api/v3.ts on lines 5865..5941

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

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

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

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

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

      Refactorings

      Further Reading

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

        export class ProfilesPager {
          protected _hasNext: boolean;
          protected pageContext: any;
      
          protected client: SecurityAndComplianceCenterApiV3;
      Severity: Major
      Found in security-and-compliance-center-api/v3.ts and 2 other locations - About 2 days to fix
      security-and-compliance-center-api/v3.ts on lines 5865..5941
      security-and-compliance-center-api/v3.ts on lines 5946..6022

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

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

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

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

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

      Refactorings

      Further Reading

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

        export class AttachmentsPager {
          protected _hasNext: boolean;
          protected pageContext: any;
      
          protected client: SecurityAndComplianceCenterApiV3;
      Severity: Major
      Found in security-and-compliance-center-api/v3.ts and 2 other locations - About 2 days to fix
      security-and-compliance-center-api/v3.ts on lines 5784..5860
      security-and-compliance-center-api/v3.ts on lines 5946..6022

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

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

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

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

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

      Refactorings

      Further Reading

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

        public listControlLibraries(
          params?: SecurityAndComplianceCenterApiV3.ListControlLibrariesParams
        ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ControlLibraryCollection>> {
          const _params = { ...params };
          const _requiredParams = [];
      Severity: Major
      Found in security-and-compliance-center-api/v3.ts and 2 other locations - About 1 day to fix
      security-and-compliance-center-api/v3.ts on lines 741..785
      security-and-compliance-center-api/v3.ts on lines 1094..1138

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

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

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

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

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

      Refactorings

      Further Reading

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

        public listRules(
          params?: SecurityAndComplianceCenterApiV3.ListRulesParams
        ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.RulesPageBase>> {
          const _params = { ...params };
          const _requiredParams = [];
      Severity: Major
      Found in security-and-compliance-center-api/v3.ts and 2 other locations - About 1 day to fix
      security-and-compliance-center-api/v3.ts on lines 345..389
      security-and-compliance-center-api/v3.ts on lines 741..785

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

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

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

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

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

      Refactorings

      Further Reading

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

        public listProfiles(
          params?: SecurityAndComplianceCenterApiV3.ListProfilesParams
        ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ProfileCollection>> {
          const _params = { ...params };
          const _requiredParams = [];
      Severity: Major
      Found in security-and-compliance-center-api/v3.ts and 2 other locations - About 1 day to fix
      security-and-compliance-center-api/v3.ts on lines 345..389
      security-and-compliance-center-api/v3.ts on lines 1094..1138

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

      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

        public getProviderTypeInstance(
          params: SecurityAndComplianceCenterApiV3.GetProviderTypeInstanceParams
        ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ProviderTypeInstanceItem>> {
          const _params = { ...params };
          const _requiredParams = ['providerTypeId', 'providerTypeInstanceId'];
      Severity: Major
      Found in security-and-compliance-center-api/v3.ts and 3 other locations - About 1 day to fix
      security-and-compliance-center-api/v3.ts on lines 1602..1645
      security-and-compliance-center-api/v3.ts on lines 1668..1711
      security-and-compliance-center-api/v3.ts on lines 2390..2433

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

      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

        public getReportRule(
          params: SecurityAndComplianceCenterApiV3.GetReportRuleParams
        ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.RuleInfo>> {
          const _params = { ...params };
          const _requiredParams = ['reportId', 'ruleId'];
      Severity: Major
      Found in security-and-compliance-center-api/v3.ts and 3 other locations - About 1 day to fix
      security-and-compliance-center-api/v3.ts on lines 1602..1645
      security-and-compliance-center-api/v3.ts on lines 1668..1711
      security-and-compliance-center-api/v3.ts on lines 3080..3123

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

      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

        public deleteProfileAttachment(
          params: SecurityAndComplianceCenterApiV3.DeleteProfileAttachmentParams
        ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.AttachmentItem>> {
          const _params = { ...params };
          const _requiredParams = ['attachmentId', 'profilesId'];
      Severity: Major
      Found in security-and-compliance-center-api/v3.ts and 3 other locations - About 1 day to fix
      security-and-compliance-center-api/v3.ts on lines 1668..1711
      security-and-compliance-center-api/v3.ts on lines 2390..2433
      security-and-compliance-center-api/v3.ts on lines 3080..3123

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

      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

        public getProfileAttachment(
          params: SecurityAndComplianceCenterApiV3.GetProfileAttachmentParams
        ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.AttachmentItem>> {
          const _params = { ...params };
          const _requiredParams = ['attachmentId', 'profilesId'];
      Severity: Major
      Found in security-and-compliance-center-api/v3.ts and 3 other locations - About 1 day to fix
      security-and-compliance-center-api/v3.ts on lines 1602..1645
      security-and-compliance-center-api/v3.ts on lines 2390..2433
      security-and-compliance-center-api/v3.ts on lines 3080..3123

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

      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

        test('listControlLibraries 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 1 other location - About 1 day to fix
      examples/security-and-compliance-center-api.v3.test.js on lines 614..648

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

      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

        test('listProfiles 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 1 other location - About 1 day to fix
      examples/security-and-compliance-center-api.v3.test.js on lines 418..452

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 249.

      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 getReport(
          params: SecurityAndComplianceCenterApiV3.GetReportParams
        ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Report>> {
          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 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 getReportSummary(
          params: SecurityAndComplianceCenterApiV3.GetReportSummaryParams
        ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ReportSummary>> {
          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 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 getControlLibrary(
          params: SecurityAndComplianceCenterApiV3.GetControlLibraryParams
        ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ControlLibrary>> {
          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 498..540
      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 getRule(
          params: SecurityAndComplianceCenterApiV3.GetRuleParams
        ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Rule>> {
          const _params = { ...params };
          const _requiredParams = ['ruleId'];
      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 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

      Severity
      Category
      Status
      Source
      Language