dotcloud/docker

View on GitHub
client/plugin_install.go

Summary

Maintainability
A
1 hr
Test Coverage

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

func (cli *Client) PluginInstall(ctx context.Context, name string, options types.PluginInstallOptions) (rc io.ReadCloser, err error) {
    query := url.Values{}
    if _, err := reference.ParseNormalizedNamed(options.RemoteRef); err != nil {
        return nil, errors.Wrap(err, "invalid remote reference")
    }
Severity: Major
Found in client/plugin_install.go - About 45 mins to fix

    Method Client.checkPluginPermissions has 6 return statements (exceeds 4 allowed).
    Open

    func (cli *Client) checkPluginPermissions(ctx context.Context, query url.Values, options types.PluginInstallOptions) (types.PluginPrivileges, error) {
        resp, err := cli.tryPluginPrivileges(ctx, query, options.RegistryAuth)
        if errdefs.IsUnauthorized(err) && options.PrivilegeFunc != nil {
            // todo: do inspect before to check existing name before checking privileges
            newAuthHeader, privilegeErr := options.PrivilegeFunc(ctx)
    Severity: Major
    Found in client/plugin_install.go - About 40 mins to fix

      There are no issues that match your filters.

      Category
      Status