gitlabhq/gitlab-shell

View on GitHub
internal/gitlabnet/lfstransfer/client.go

Summary

Maintainability
A
2 hrs
Test Coverage

Method Client.Lock has 7 return statements (exceeds 4 allowed).
Open

func (c *Client) Lock(path, refname string) (*Lock, error) {
    var ref *batchRef
    if refname != "" {
        ref = &batchRef{
            Name: refname,
Severity: Major
Found in internal/gitlabnet/lfstransfer/client.go - About 45 mins to fix

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

    func (c *Client) Batch(operation string, reqObjects []*BatchObject, ref string, reqHashAlgo string) (*BatchResponse, error) {
        // FIXME: This causes tests to fail
        // if ref == "" {
        //     return nil, errors.New("A ref must be specified.")
        // }
    Severity: Major
    Found in internal/gitlabnet/lfstransfer/client.go - About 35 mins to fix

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

      func (c *Client) Unlock(id string, force bool, refname string) (*Lock, error) {
          var ref *batchRef
          if refname != "" {
              ref = &batchRef{
                  Name: refname,
      Severity: Major
      Found in internal/gitlabnet/lfstransfer/client.go - About 35 mins to fix

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

        func (c *Client) ListLocksVerify(path, id, cursor string, limit int, ref string) (*ListLocksVerifyResponse, error) {
            url, err := url.Parse(c.href)
            if err != nil {
                return nil, err
            }
        Severity: Major
        Found in internal/gitlabnet/lfstransfer/client.go - About 35 mins to fix

          FIXME found
          Open

              // FIXME: This causes tests to fail

          There are no issues that match your filters.

          Category
          Status