server/periodic.go

Summary

Maintainability
A
2 hrs
Test Coverage
F
0%

Method Backend.Periodic has 56 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (b *Backend) Periodic(ctx context.Context, req *logical.Request) error {
    entry, err := req.Storage.Get(ctx, lastPeriodicRunTimestampKey)
    if err != nil {
        return fmt.Errorf("unable to get key %q from storage: %w", lastPeriodicRunTimestampKey, err)
    }
Severity: Minor
Found in server/periodic.go - About 1 hr to fix

    Method Backend.Periodic has 11 return statements (exceeds 4 allowed).
    Open

    func (b *Backend) Periodic(ctx context.Context, req *logical.Request) error {
        entry, err := req.Storage.Get(ctx, lastPeriodicRunTimestampKey)
        if err != nil {
            return fmt.Errorf("unable to get key %q from storage: %w", lastPeriodicRunTimestampKey, err)
        }
    Severity: Major
    Found in server/periodic.go - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status