lunemec/nanny

View on GitHub

Showing 25 of 25 total issues

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

func signalHandler(n *nanny.Nanny, notifiers notifiers, store storage.Storage, w http.ResponseWriter, req *http.Request) error {
Severity: Minor
Found in api/api.go - About 35 mins to fix

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

    func NewWebhook(WebhookURL string,
        WebhookURLAllClear string,
        WebhookSecret string,
        RequestTimeout time.Duration,
        AllowInsecureTLS bool) (Notifier, error) {
    Severity: Minor
    Found in pkg/notifier/webhook.go - About 35 mins to fix

      Method twilio.NotifyAllClear has 5 return statements (exceeds 4 allowed).
      Open

      func (n *twilio) NotifyAllClear(msg Message) error {
          resp, exc, err := n.t.SendSMS(n.from, n.to, msg.FormatAllClear(), "", n.appSid)
          if err != nil {
              return errors.Wrap(err, "unable to send SMS via twilio")
          }
      Severity: Major
      Found in pkg/notifier/twilio.go - About 35 mins to fix

        Method twilio.Notify has 5 return statements (exceeds 4 allowed).
        Open

        func (n *twilio) Notify(msg Message) error {
            resp, exc, err := n.t.SendSMS(n.from, n.to, msg.Format(), "", n.appSid)
            if err != nil {
                return errors.Wrap(err, "unable to send SMS via twilio")
            }
        Severity: Major
        Found in pkg/notifier/twilio.go - About 35 mins to fix

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

          func makeNotifiers() (map[string]notifier.Notifier, error) {
              notifiers := make(map[string]notifier.Notifier)
              if config.Stderr.Enabled {
                  notifiers["stderr"] = &notifier.StdErr{}
              }
          Severity: Major
          Found in cmd/root.go - About 35 mins to fix
            Severity
            Category
            Status
            Source
            Language