pstuifzand/ekster

View on GitHub
pkg/timeline/postgres.go

Summary

Maintainability
A
3 hrs
Test Coverage

Method postgresStream.Items has 70 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (p *postgresStream) Items(before, after string) (microsub.Timeline, error) {
    ctx := context.Background()
    conn, err := p.database.Conn(ctx)
    if err != nil {
        return microsub.Timeline{}, err
Severity: Minor
Found in pkg/timeline/postgres.go - About 1 hr to fix

Method postgresStream.Init has 8 return statements (exceeds 4 allowed).
Open

func (p *postgresStream) Init() error {
    ctx := context.Background()
    conn, err := p.database.Conn(ctx)
    if err != nil {
        return err
Severity: Major
Found in pkg/timeline/postgres.go - About 50 mins to fix

Method postgresStream.Items has 6 return statements (exceeds 4 allowed).
Open

func (p *postgresStream) Items(before, after string) (microsub.Timeline, error) {
    ctx := context.Background()
    conn, err := p.database.Conn(ctx)
    if err != nil {
        return microsub.Timeline{}, err
Severity: Major
Found in pkg/timeline/postgres.go - About 40 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

TODO found
Open

    // TODO: should only be set of there are more items available
Severity: Minor
Found in pkg/timeline/postgres.go by fixme

There are no issues that match your filters.

Category
Status