Showing 58 of 157 total issues
Method HTTPMap.UnmarshalJSON
has 7 return statements (exceeds 4 allowed). Open
Open
func (ret *HTTPMap) UnmarshalJSON(data []byte) error { // Curried json.Unmarshal unmarshal := func(i interface{}) error { if err := json.Unmarshal(data, i); err != nil { return err
Method UserMap.UnmarshalJSON
has 7 return statements (exceeds 4 allowed). Open
Open
func (ret *UserMap) UnmarshalJSON(data []byte) error { // Curried json.Unmarshal unmarshal := func(i interface{}) error { if err := json.Unmarshal(data, i); err != nil { return err
Method MatchingMap.UnmarshalJSON
has 7 return statements (exceeds 4 allowed). Open
Open
func (ret *MatchingMap) UnmarshalJSON(data []byte) error { // Curried json.Unmarshal unmarshal := func(i interface{}) error { if err := json.Unmarshal(data, i); err != nil { return err
Method PortMap.UnmarshalJSON
has 7 return statements (exceeds 4 allowed). Open
Open
func (ret *PortMap) UnmarshalJSON(data []byte) error { // Curried json.Unmarshal unmarshal := func(i interface{}) error { if err := json.Unmarshal(data, i); err != nil { return err
Method AddrMap.UnmarshalJSON
has 7 return statements (exceeds 4 allowed). Open
Open
func (ret *AddrMap) UnmarshalJSON(data []byte) error { // Curried json.Unmarshal unmarshal := func(i interface{}) error { if err := json.Unmarshal(data, i); err != nil { return err
Method FileMap.UnmarshalJSON
has 7 return statements (exceeds 4 allowed). Open
Open
func (ret *FileMap) UnmarshalJSON(data []byte) error { // Curried json.Unmarshal unmarshal := func(i interface{}) error { if err := json.Unmarshal(data, i); err != nil { return err
Method PackageMap.UnmarshalJSON
has 7 return statements (exceeds 4 allowed). Open
Open
func (ret *PackageMap) UnmarshalJSON(data []byte) error { // Curried json.Unmarshal unmarshal := func(i interface{}) error { if err := json.Unmarshal(data, i); err != nil { return err
Method GroupMap.UnmarshalJSON
has 7 return statements (exceeds 4 allowed). Open
Open
func (ret *GroupMap) UnmarshalJSON(data []byte) error { // Curried json.Unmarshal unmarshal := func(i interface{}) error { if err := json.Unmarshal(data, i); err != nil { return err
Method CommandMap.UnmarshalJSON
has 7 return statements (exceeds 4 allowed). Open
Open
func (ret *CommandMap) UnmarshalJSON(data []byte) error { // Curried json.Unmarshal unmarshal := func(i interface{}) error { if err := json.Unmarshal(data, i); err != nil { return err
Method DNSMap.UnmarshalJSON
has 7 return statements (exceeds 4 allowed). Open
Open
func (ret *DNSMap) UnmarshalJSON(data []byte) error { // Curried json.Unmarshal unmarshal := func(i interface{}) error { if err := json.Unmarshal(data, i); err != nil { return err
Method ProcessMap.UnmarshalJSON
has 7 return statements (exceeds 4 allowed). Open
Open
func (ret *ProcessMap) UnmarshalJSON(data []byte) error { // Curried json.Unmarshal unmarshal := func(i interface{}) error { if err := json.Unmarshal(data, i); err != nil { return err
Avoid deeply nested control flow statements. Open
Open
} else if _, err := os.Stat("/etc/debian_version"); err == nil { return "debian" }
Method ResourceTypeMap.UnmarshalJSON
has 7 return statements (exceeds 4 allowed). Open
Open
func (ret *ResourceTypeMap) UnmarshalJSON(data []byte) error { // Curried json.Unmarshal unmarshal := func(i interface{}) error { if err := json.Unmarshal(data, i); err != nil { return err
Method MountMap.UnmarshalJSON
has 7 return statements (exceeds 4 allowed). Open
Open
func (ret *MountMap) UnmarshalJSON(data []byte) error { // Curried json.Unmarshal unmarshal := func(i interface{}) error { if err := json.Unmarshal(data, i); err != nil { return err
Function ValidateContains
has 6 return statements (exceeds 4 allowed). Open
Open
func ValidateContains(res ResourceRead, property string, expectedValues []string, method func() (io.Reader, error), skip bool) TestResult { format.TruncatedDiff = false id := res.ID() title := res.GetTitle() meta := res.GetMeta()
Function lookupUserGroups
has 6 return statements (exceeds 4 allowed). Open
Open
func lookupUserGroups(userS user.User) ([]user.Group, error) { // Get operating system-specific group reader-closer. group, err := user.GetGroup() if err != nil { return []user.Group{user.Group{}}, err
Function DetectDistro
has 6 return statements (exceeds 4 allowed). Open
Open
func DetectDistro() string { if b, e := ioutil.ReadFile("/etc/lsb-release"); e == nil && bytes.Contains(b, []byte("Ubuntu")) { return "ubuntu" } else if isRedhat() { return "redhat"
Function ValidateContains
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func ValidateContains(res ResourceRead, property string, expectedValues []string, method func() (io.Reader, error), skip bool) TestResult {
Function ValidateValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func ValidateValue(res ResourceRead, property string, expectedValue interface{}, actual interface{}, skip bool) TestResult {
Function validateHeader
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func validateHeader(res ResourceRead, property string, expectedHeaders map[string][]string, actualHeaders system.Header, skip bool) TestResult {