CloudSlang/cs-actions

View on GitHub

Showing 2,058 of 4,022 total issues

SSHShellInputs has 56 methods (exceeds 20 allowed). Consider refactoring.
Open

public class SSHShellInputs {
    private String host;
    private String port;
    private String username;
    private String password;

    Method updateVariables has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
    Open

        @NotNull
        public static Map<String, Map<String, String>> updateVariables(@NotNull TerraformVariableInputs terraformVariableInputs, @NotNull TerraformWorkspaceInputs terraformWorkspaceInputs) throws Exception {
            String variableName;
            String variableValue;
            String sensitiveVariableValue;

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    File HttpClientRequest.java has 493 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Copyright 2020-2024 Open Text
     * This program and the accompanying materials
     * are made available under the terms of the Apache License v2.0 which accompany this distribution.
     *

      VmServiceTest has 53 methods (exceeds 20 allowed). Consider refactoring.
      Open

      @RunWith(PowerMockRunner.class)
      @PrepareForTest({GetObjectProperties.class, MorObjectHandler.class, VirtualMachineRelocateSpec.class,
              VmConfigSpecs.class, VmService.class, VmUtils.class})
      public class VmServiceTest {
          @Rule

        Method getCellFromWorksheet has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
        Open

            private static String getCellFromWorksheet(final Workbook excelDoc,
                                                       final Sheet worksheet,
                                                       final List<Integer> columnIndex,
                                                       final List<Integer> rowIndex,
                                                       final String rowDelimiter,

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function execute has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
        Open

          @Action(name = UPDATE_BUCKET_OPERATION_NAME,
            description = UPDATE_BUCKET_OPERATION_DESC,
            outputs = Array(
              new Output(value = RETURN_CODE, description = RETURN_CODE_DESC),
              new Output(value = RETURN_RESULT, description = RETURN_RESULT_DESC),

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        File SendMailServiceTest.java has 466 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         * Copyright 2021-2024 Open Text
         * This program and the accompanying materials
         * are made available under the terms of the Apache License v2.0 which accompany this distribution.
         *

          EditJsonTest has 51 methods (exceeds 20 allowed). Consider refactoring.
          Open

          public class EditJsonTest {
          
              private static final String RETURN_RESULT = "returnResult";
              public static final String VALIDATE_VALUE_FALSE = "false";
              public static final String VALIDATE_VALUE_TRUE = "true";

            AbbyyInput has 51 methods (exceeds 20 allowed). Consider refactoring.
            Open

            public abstract class AbbyyInput implements HttpRequest {
                private final LocationId locationId;
                private final String applicationId;
                private final String password;
                private final String proxyHost;

              File CustomInputs.java has 461 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*
               * Copyright 2019-2024 Open Text
               * This program and the accompanying materials
               * are made available under the terms of the Apache License v2.0 which accompany this distribution.
               *

                File EditJsonTest.java has 461 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*
                 * Copyright 2021-2024 Open Text
                 * This program and the accompanying materials
                 * are made available under the terms of the Apache License v2.0 which accompany this distribution.
                 *

                  Method getMessageByContentTypes has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected Map<String, String> getMessageByContentTypes(Message message, String characterSet) throws Exception {
                  
                          Map<String, String> messageMap = new HashMap<>();
                  
                          if (message.isMimeType(MimeTypes.TEXT_PLAIN)) {

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Method execute has 172 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      @Action(name = "Get email",
                              outputs = {
                                      @Output(value = RETURN_RESULT, description = RETURN_RESULT_DESC),
                                      @Output(value = RETURN_CODE, description = RETURN_CODE_DESC),
                                      @Output(value = EXCEPTION, description = EXCEPTION_DESC),

                    Builder has 49 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                        public static class Builder {
                            private String url;
                            private String tlsVersion;
                            private String allowedCyphers;
                            private String authType;

                      File SharepointService.java has 447 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /*
                       * Copyright 2024 Open Text
                       * This program and the accompanying materials
                       * are made available under the terms of the Apache License v2.0 which accompany this distribution.
                       *

                        File VmUtils.java has 446 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /*
                         * Copyright 2019-2024 Open Text
                         * This program and the accompanying materials
                         * are made available under the terms of the Apache License v2.0 which accompany this distribution.
                         *

                          HttpRequest has 48 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                          public interface HttpRequest {
                              String getUrl() throws URISyntaxException;
                          
                          
                              String getTlsVersion();

                            HttpClientRequest has 48 methods (exceeds 20 allowed). Consider refactoring.
                            Open

                            public class HttpClientRequest implements HttpRequest {
                                private final String url;
                                private final String tlsVersion;
                                private final String allowedCyphers;
                                private final String authType;

                              File InputsUtil.java has 444 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /*
                               * Copyright 2019-2024 Open Text
                               * This program and the accompanying materials
                               * are made available under the terms of the Apache License v2.0 which accompany this distribution.
                               *

                                File WSManRemoteShellServiceTest.java has 443 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                /*
                                 * Copyright 2019-2024 Open Text
                                 * This program and the accompanying materials
                                 * are made available under the terms of the Apache License v2.0 which accompany this distribution.
                                 *
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language