ory-am/hydra

View on GitHub
cmd/cli/handler_janitor.go

Summary

Maintainability
A
2 hrs
Test Coverage

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

func purge(cmd *cobra.Command, args []string, sl *servicelocatorx.Options, dOpts []driver.OptionsModifier) error {
    ctx := cmd.Context()
    var d driver.Registry

    co := []configx.OptionModifier{
Severity: Minor
Found in cmd/cli/handler_janitor.go - About 1 hr to fix

    Function cleanupRun has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    func cleanupRun(ctx context.Context, notAfter time.Time, limit int, batchSize int, routines ...cleanupRoutine) error {
    Severity: Minor
    Found in cmd/cli/handler_janitor.go - About 35 mins to fix

      Method JanitorHandler.Args has 5 return statements (exceeds 4 allowed).
      Open

      func (*JanitorHandler) Args(cmd *cobra.Command, args []string) error {
          if len(args) == 0 &&
              !flagx.MustGetBool(cmd, ReadFromEnv) &&
              len(flagx.MustGetStringSlice(cmd, Config)) == 0 {
      
      
      Severity: Major
      Found in cmd/cli/handler_janitor.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status