Add gocycle lint

Whitelist some existing offenders, and use a high limit for now.
This limit should decrese over time.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin
2017-05-02 16:14:43 -04:00
parent 8f73a12f9b
commit 08af0f28c5
15 changed files with 23 additions and 2 deletions

View File

@ -113,6 +113,7 @@ func runCreate(dockerCli *command.DockerCli, opts createOptions) error {
// possible to correlate the various related parameters and consolidate them.
// consolidateIpam consolidates subnets, ip-ranges, gateways and auxiliary addresses into
// structured ipam data.
// nolint: gocyclo
func consolidateIpam(subnets, ranges, gateways []string, auxaddrs map[string]string) ([]network.IPAMConfig, error) {
if len(subnets) < len(ranges) || len(subnets) < len(gateways) {
return nil, errors.Errorf("every ip-range or gateway must have a corresponding subnet")