treasure-data/embulk-input-marketo

View on GitHub

Showing 67 of 91 total issues

Method ingestServiceData has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public TaskReport ingestServiceData(PluginTask task, RecordImporter recordImporter, int taskIndex, PageBuilder pageBuilder)
    {
        // query by date range and incremental import and not preview
        if (task.getQueryBy().isPresent() && task.getQueryBy().get() == QueryBy.DATE_RANGE && task.getIncremental() && !Exec.isPreview()) {
Severity: Minor
Found in src/main/java/org/embulk/input/marketo/delegate/ProgramInputPlugin.java - About 45 mins to fix

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 getCustomObjectRecordWithPagination has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    private <T> RecordPagingIterable<T> getCustomObjectRecordWithPagination(final String endPoint, final String customObjectFilterType, final String customObjectFields, final Integer fromValue, final Integer toValue, final Class<T> recordClass)
Severity: Minor
Found in src/main/java/org/embulk/input/marketo/rest/MarketoRestClient.java - About 45 mins to fix

    Method doPost has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        protected <T> T doPost(final String target, final Map<String, String> headers, final Multimap<String, String> params, final String content, Jetty94ResponseReader<T> responseReader)
    Severity: Minor
    Found in src/main/java/org/embulk/input/marketo/rest/MarketoBaseRestClient.java - About 35 mins to fix

      Method extractAllActivity has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public File extractAllActivity(List<Integer> activityTypeIds, Date startTime, Date endTime, int pollingTimeIntervalSecond, int bulkJobTimeoutSecond)
      Severity: Minor
      Found in src/main/java/org/embulk/input/marketo/MarketoServiceImpl.java - About 35 mins to fix

        Method extractAllActivity has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            File extractAllActivity(List<Integer> activityTypeIds, Date startTime, Date endTime, int pollingTimeIntervalSecond, int bulkJobTimeoutSecond);
        Severity: Minor
        Found in src/main/java/org/embulk/input/marketo/MarketoService.java - About 35 mins to fix

          Method getCustomObject has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              Iterable<ObjectNode> getCustomObject(String customObjectAPIName, String customObjectFilterType, String customObjectFields, Integer fromValue, Integer toValue);
          Severity: Minor
          Found in src/main/java/org/embulk/input/marketo/MarketoService.java - About 35 mins to fix

            Method doPost has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                protected <T> T doPost(final String target, final Map<String, String> headers, final Multimap<String, String> params, Jetty94ResponseReader<T> responseReader, final ContentProvider content)
            Severity: Minor
            Found in src/main/java/org/embulk/input/marketo/rest/MarketoBaseRestClient.java - About 35 mins to fix

              Method getCustomObject has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public Iterable<ObjectNode> getCustomObject(String customObjectAPIName, String customObjectFilterType, String customObjectFields, Integer fromValue, Integer toValue)
              Severity: Minor
              Found in src/main/java/org/embulk/input/marketo/rest/MarketoRestClient.java - About 35 mins to fix

                Method getCustomObject has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public Iterable<ObjectNode> getCustomObject(String customObjectAPIName, String customObjectFilterType, String customObjectFields, Integer fromValue, Integer toValue)
                Severity: Minor
                Found in src/main/java/org/embulk/input/marketo/MarketoServiceImpl.java - About 35 mins to fix

                  Method getTokenPage has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                              @SuppressWarnings("unchecked")
                              private RecordPagingIterable.TokenPage<T> getTokenPage(RecordPagingIterable.TokenPage page)
                              {
                                  ImmutableListMultimap.Builder params = new ImmutableListMultimap.Builder<>();
                                  params.put("_method", "GET");
                  Severity: Minor
                  Found in src/main/java/org/embulk/input/marketo/rest/MarketoRestClient.java - About 35 mins to fix

                  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 doRequestWithWrappedException has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private <T> T doRequestWithWrappedException(final String target, final HttpMethod method, final Map<String, String> headers, final Multimap<String, String> params, final ContentProvider contentProvider, Jetty94ResponseReader<T> responseReader)
                      {
                          try {
                              return doRequest(target, method, headers, params, contentProvider, responseReader);
                          }
                  Severity: Minor
                  Found in src/main/java/org/embulk/input/marketo/rest/MarketoBaseRestClient.java - About 35 mins to fix

                  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 buildConfigDiff has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      @Override
                      public ConfigDiff buildConfigDiff(PluginTask task, Schema schema, int taskCount, List<TaskReport> taskReports)
                      {
                          ConfigDiff configDiff = super.buildConfigDiff(task, schema, taskCount, taskReports);
                          // set next next earliestUpdatedAt, latestUpdatedAt
                  Severity: Minor
                  Found in src/main/java/org/embulk/input/marketo/delegate/ProgramInputPlugin.java - About 35 mins to fix

                  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 equals has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      @Override
                      public boolean equals(Object o)
                      {
                          if (this == o) {
                              return true;
                  Severity: Minor
                  Found in src/main/java/org/embulk/input/marketo/model/MarketoField.java - About 35 mins to fix

                  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

                  Avoid too many return statements within this method.
                  Open

                                          return "";
                  Severity: Major
                  Found in src/main/java/org/embulk/input/marketo/CsvTokenizer.java - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                                return quotedValue.toString();
                    Severity: Major
                    Found in src/main/java/org/embulk/input/marketo/CsvTokenizer.java - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                                  return line.substring(valueStartPos, valueEndPos);
                      Severity: Major
                      Found in src/main/java/org/embulk/input/marketo/CsvTokenizer.java - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                                return quotedValue.toString();
                        Severity: Major
                        Found in src/main/java/org/embulk/input/marketo/CsvTokenizer.java - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                              return "";
                          Severity: Major
                          Found in src/main/java/org/embulk/input/marketo/CsvTokenizer.java - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                                        return line.substring(valueStartPos, valueEndPos);
                            Severity: Major
                            Found in src/main/java/org/embulk/input/marketo/CsvTokenizer.java - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                                      return line.substring(valueStartPos, valueEndPos);
                              Severity: Major
                              Found in src/main/java/org/embulk/input/marketo/CsvTokenizer.java - About 30 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language