pstuifzand/ekster

View on GitHub

Showing 86 of 159 total issues

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

func cachedCheckAuthToken(conn redis.Conn, header string, tokenEndpoint string, r *auth.TokenResponse) (bool, error) {
    tokens := authHeaderRegex.FindStringSubmatch(header)

    if len(tokens) != 2 {
        return false, fmt.Errorf("could not find token in header")
Severity: Major
Found in cmd/eksterd/auth.go - About 35 mins to fix

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

func (c *Client) FollowGetList(channel string) ([]microsub.Feed, error) {
    args := make(map[string]string)
    args["channel"] = channel
    res, err := c.microsubGetRequest("follow", args)
    if err != nil {
Severity: Major
Found in pkg/client/requests.go - About 35 mins to fix

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

func (c *Client) TimelineGet(before, after, channel string) (microsub.Timeline, error) {
    args := make(map[string]string)
    args["after"] = after
    args["before"] = before
    args["channel"] = channel
Severity: Major
Found in pkg/client/requests.go - About 35 mins to fix

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

func (c *Client) PreviewURL(url string) (microsub.Timeline, error) {
    args := make(map[string]string)
    args["url"] = url
    res, err := c.microsubPostRequest("preview", args)
    if err != nil {
Severity: Major
Found in pkg/client/requests.go - About 35 mins to fix

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

func FeedItems(fetcher FetcherFunc, fetchURL, contentType string, body io.Reader) ([]microsub.Item, error) {
    log.Printf("ProcessContent %s\n", fetchURL)
    log.Println("Found " + contentType)

    items := []microsub.Item{}
Severity: Major
Found in pkg/fetch/fetch.go - About 35 mins to fix

Method postgresStream.AddItem has 5 return statements (exceeds 4 allowed).
Open

func (p *postgresStream) AddItem(item microsub.Item) (bool, error) {
    ctx := context.Background()
    conn, err := p.database.Conn(ctx)
    if err != nil {
        return false, err
Severity: Major
Found in pkg/timeline/postgres.go - About 35 mins to fix
Severity
Category
Status
Source
Language