daemon/container.go
Function validateHostConfig
has 10 return statements (exceeds 4 allowed). Open
Open
func validateHostConfig(hostConfig *containertypes.HostConfig) error {
if hostConfig == nil {
return nil
}
Method Daemon.newContainer
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (daemon *Daemon) newContainer(name string, operatingSystem string, config *containertypes.Config, hostConfig *containertypes.HostConfig, imgID image.ID, managed bool) (*container.Container, error) {
Function validateHealthCheck
has 7 return statements (exceeds 4 allowed). Open
Open
func validateHealthCheck(healthConfig *containertypes.HealthConfig) error {
if healthConfig == nil {
return nil
}
if healthConfig.Interval != 0 && healthConfig.Interval < containertypes.MinimumDuration {
Method Daemon.GetContainer
has 6 return statements (exceeds 4 allowed). Open
Open
func (daemon *Daemon) GetContainer(prefixOrName string) (*container.Container, error) {
if len(prefixOrName) == 0 {
return nil, errors.WithStack(invalidIdentifier(prefixOrName))
}
Function validateContainerConfig
has 5 return statements (exceeds 4 allowed). Open
Open
func validateContainerConfig(config *containertypes.Config) error {
if config == nil {
return nil
}
if err := translateWorkingDir(config); err != nil {