koooge/redash-sdk-go

View on GitHub

Showing 4 of 30 total issues

Function main has 79 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func main() {
    config := &redash.Config{
        EndpointUrl: os.Getenv("REDASH_ENDPOINT_URL"),
        ApiKey:      os.Getenv("REDASH_API_KEY"),
    }
Severity: Major
Found in sample/data_sources.go - About 2 hrs to fix

    Function main has 59 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func main() {
        config := &redash.Config{
            EndpointUrl: os.Getenv("REDASH_ENDPOINT_URL"),
            ApiKey:      os.Getenv("REDASH_API_KEY"),
        }
    Severity: Minor
    Found in sample/queries.go - About 1 hr to fix

      Function main has 51 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func main() {
          config := &redash.Config{
              EndpointUrl: os.Getenv("REDASH_ENDPOINT_URL"),
              ApiKey:      os.Getenv("REDASH_API_KEY"),
          }
      Severity: Minor
      Found in sample/destinations.go - About 1 hr to fix

        Method Client.request has 5 return statements (exceeds 4 allowed).
        Open

        func (c *Client) request(httpMethod string, path string, body string) (*http.Response, error) {
            url := c.Config.EndpointUrl + path
            resp, err := func() (*http.Response, error) {
                req, err := http.NewRequest(httpMethod, url, strings.NewReader(body))
                if err != nil {
        Severity: Major
        Found in redash/client.go - About 35 mins to fix
          Severity
          Category
          Status
          Source
          Language