thedadams/gotion

View on GitHub

Showing 5 of 20 total issues

File filter.go has 552 lines of code (exceeds 500 allowed). Consider refactoring.
Open

package notion

import (
    "encoding/json"
    "time"
Severity: Minor
Found in notion/filter.go - About 3 hrs to fix

    Method Client.makeRequest has 7 return statements (exceeds 4 allowed).
    Open

    func (c *Client) makeRequest(ctx context.Context, method, url string, body io.Reader, respObject interface{}) error {
        req, err := http.NewRequestWithContext(ctx, method, url, body)
        if err != nil {
            return err
        }
    Severity: Major
    Found in client.go - About 45 mins to fix

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

      func (c *Client) getList(ctx context.Context, url string, cursor *string, maxResults int, results list) error {
      Severity: Minor
      Found in client.go - About 35 mins to fix

        Function unmarshalJSONFlattenByType has 5 return statements (exceeds 4 allowed).
        Open

        func unmarshalJSONFlattenByType(bt []byte, b typed) error {
            if err := json.Unmarshal(bt, b); err != nil {
                return err
            }
        
        
        Severity: Major
        Found in notion/object.go - About 35 mins to fix

          Method SearchResults.UnmarshalJSON has 5 return statements (exceeds 4 allowed).
          Open

          func (sr *SearchResults) UnmarshalJSON(b []byte) error {
              m := make([]map[string]interface{}, 0)
              if err := json.Unmarshal(b, &m); err != nil {
                  return err
              }
          Severity: Major
          Found in search.go - About 35 mins to fix
            Severity
            Category
            Status
            Source
            Language