IBM/scc-node-sdk

View on GitHub

Showing 159 of 159 total issues

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

  export interface ObjectStorage {
    /** The connected Cloud Object Storage instance CRN. */
    instance_crn?: string;
    /** The connected Cloud Object Storage bucket name. */
    bucket?: string;
Severity: Major
Found in security-and-compliance-center-api/v3.ts and 2 other locations - About 1 hr to fix
security-and-compliance-center-api/v3.ts on lines 4904..4915
security-and-compliance-center-api/v3.ts on lines 5621..5632

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

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

Function updateSettings has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  public updateSettings(
    params?: SecurityAndComplianceCenterApiV3.UpdateSettingsParams
  ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Settings>> {
    const _params = { ...params };
    const _requiredParams = [];
Severity: Minor
Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

    Function listRules has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      public listRules(
        params?: SecurityAndComplianceCenterApiV3.ListRulesParams
      ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.RulesPageBase>> {
        const _params = { ...params };
        const _requiredParams = [];
    Severity: Minor
    Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

      Function listControlLibraries has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        public listControlLibraries(
          params?: SecurityAndComplianceCenterApiV3.ListControlLibrariesParams
        ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ControlLibraryCollection>> {
          const _params = { ...params };
          const _requiredParams = [];
      Severity: Minor
      Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

        Function listProfiles has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          public listProfiles(
            params?: SecurityAndComplianceCenterApiV3.ListProfilesParams
          ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ProfileCollection>> {
            const _params = { ...params };
            const _requiredParams = [];
        Severity: Minor
        Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

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

            export interface DeleteProfileAttachmentParams {
              /** The attachment ID. */
              attachmentId: string;
              /** The profile ID. */
              profilesId: string;
          Severity: Major
          Found in security-and-compliance-center-api/v3.ts and 4 other locations - About 1 hr to fix
          security-and-compliance-center-api/v3.ts on lines 3822..3838
          security-and-compliance-center-api/v3.ts on lines 4111..4128
          security-and-compliance-center-api/v3.ts on lines 4340..4357
          security-and-compliance-center-api/v3.ts on lines 4360..4377

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

          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

            export interface GetProviderTypeInstanceParams {
              /** The provider type ID. */
              providerTypeId: string;
              /** The provider type instance ID. */
              providerTypeInstanceId: string;
          Severity: Major
          Found in security-and-compliance-center-api/v3.ts and 4 other locations - About 1 hr to fix
          security-and-compliance-center-api/v3.ts on lines 3803..3819
          security-and-compliance-center-api/v3.ts on lines 3822..3838
          security-and-compliance-center-api/v3.ts on lines 4111..4128
          security-and-compliance-center-api/v3.ts on lines 4340..4357

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

          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

            export interface GetReportRuleParams {
              /** The ID of the scan that is associated with a report. */
              reportId: string;
              /** The ID of a rule in a report. */
              ruleId: string;
          Severity: Major
          Found in security-and-compliance-center-api/v3.ts and 4 other locations - About 1 hr to fix
          security-and-compliance-center-api/v3.ts on lines 3803..3819
          security-and-compliance-center-api/v3.ts on lines 3822..3838
          security-and-compliance-center-api/v3.ts on lines 4340..4357
          security-and-compliance-center-api/v3.ts on lines 4360..4377

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

          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

            export interface DeleteProviderTypeInstanceParams {
              /** The provider type ID. */
              providerTypeId: string;
              /** The provider type instance ID. */
              providerTypeInstanceId: string;
          Severity: Major
          Found in security-and-compliance-center-api/v3.ts and 4 other locations - About 1 hr to fix
          security-and-compliance-center-api/v3.ts on lines 3803..3819
          security-and-compliance-center-api/v3.ts on lines 3822..3838
          security-and-compliance-center-api/v3.ts on lines 4111..4128
          security-and-compliance-center-api/v3.ts on lines 4360..4377

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

          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

            export interface GetProfileAttachmentParams {
              /** The attachment ID. */
              attachmentId: string;
              /** The profile ID. */
              profilesId: string;
          Severity: Major
          Found in security-and-compliance-center-api/v3.ts and 4 other locations - About 1 hr to fix
          security-and-compliance-center-api/v3.ts on lines 3803..3819
          security-and-compliance-center-api/v3.ts on lines 4111..4128
          security-and-compliance-center-api/v3.ts on lines 4340..4357
          security-and-compliance-center-api/v3.ts on lines 4360..4377

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

          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

          Function getProfileAttachment has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            public getProfileAttachment(
              params: SecurityAndComplianceCenterApiV3.GetProfileAttachmentParams
            ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.AttachmentItem>> {
              const _params = { ...params };
              const _requiredParams = ['attachmentId', 'profilesId'];
          Severity: Minor
          Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

            Function listAttachmentsAccount has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              public listAttachmentsAccount(
                params?: SecurityAndComplianceCenterApiV3.ListAttachmentsAccountParams
              ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.AttachmentCollection>> {
                const _params = { ...params };
                const _requiredParams = [];
            Severity: Minor
            Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

              Function getReportRule has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                public getReportRule(
                  params: SecurityAndComplianceCenterApiV3.GetReportRuleParams
                ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.RuleInfo>> {
                  const _params = { ...params };
                  const _requiredParams = ['reportId', 'ruleId'];
              Severity: Minor
              Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                Function getProviderTypeInstance has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  public getProviderTypeInstance(
                    params: SecurityAndComplianceCenterApiV3.GetProviderTypeInstanceParams
                  ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ProviderTypeInstanceItem>> {
                    const _params = { ...params };
                    const _requiredParams = ['providerTypeId', 'providerTypeInstanceId'];
                Severity: Minor
                Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                  Function createScan has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    public createScan(
                      params: SecurityAndComplianceCenterApiV3.CreateScanParams
                    ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Scan>> {
                      const _params = { ...params };
                      const _requiredParams = ['attachmentId'];
                  Severity: Minor
                  Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                    Function deleteProfileAttachment has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      public deleteProfileAttachment(
                        params: SecurityAndComplianceCenterApiV3.DeleteProfileAttachmentParams
                      ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.AttachmentItem>> {
                        const _params = { ...params };
                        const _requiredParams = ['attachmentId', 'profilesId'];
                    Severity: Minor
                    Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                      Function getRule has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        public getRule(
                          params: SecurityAndComplianceCenterApiV3.GetRuleParams
                        ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Rule>> {
                          const _params = { ...params };
                          const _requiredParams = ['ruleId'];
                      Severity: Minor
                      Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                        Function getLatestReports has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          public getLatestReports(
                            params?: SecurityAndComplianceCenterApiV3.GetLatestReportsParams
                          ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ReportLatest>> {
                            const _params = { ...params };
                            const _requiredParams = [];
                        Severity: Minor
                        Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                          Function getReportSummary has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            public getReportSummary(
                              params: SecurityAndComplianceCenterApiV3.GetReportSummaryParams
                            ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.ReportSummary>> {
                              const _params = { ...params };
                              const _requiredParams = ['reportId'];
                          Severity: Minor
                          Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix

                            Function getReport has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              public getReport(
                                params: SecurityAndComplianceCenterApiV3.GetReportParams
                              ): Promise<SecurityAndComplianceCenterApiV3.Response<SecurityAndComplianceCenterApiV3.Report>> {
                                const _params = { ...params };
                                const _requiredParams = ['reportId'];
                            Severity: Minor
                            Found in security-and-compliance-center-api/v3.ts - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language