Showing 439 of 439 total issues
Function RenderJSON
has 6 return statements (exceeds 4 allowed). Open
Open
func RenderJSON(c *RuntimeConfig) (string, error) {
var err error
debug = c.Debug
currentTemplateFilter, err = NewTemplateFilter(c.Vars, c.VarsInline)
if err != nil {
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 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 {
id := res.ID()
title := res.GetTitle()
meta := res.GetMeta()
typ := reflect.TypeOf(res)
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 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 AddResource
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func AddResource(fileName string, gossConfig GossConfig, resourceName, key string, config util.Config, sys *system.System) error {
Function NewTemplateFilter
has 5 return statements (exceeds 4 allowed). Open
Open
func NewTemplateFilter(varsFile string, varsInline string) (func([]byte) ([]byte, error), error) {
vars, err := loadVars(varsFile, varsInline)
if err != nil {
return nil, fmt.Errorf("failed while loading vars file %q: %v", varsFile, err)
}
Function shouldSkip
has 5 return statements (exceeds 4 allowed). Open
Open
func shouldSkip(results []TestResult) bool {
if len(results) < 1 {
return false
}
if results[0].Err != nil {
Method MatchingMap.UnmarshalYAML
has 5 return statements (exceeds 4 allowed). Open
Open
func (ret *MatchingMap) UnmarshalYAML(unmarshal func(v interface{}) error) error {
// Validate configuration
zero := Matching{}
whitelist, err := util.WhitelistAttrs(zero, util.YAML)
if err != nil {
Function toVersions
has 5 return statements (exceeds 4 allowed). Open
Open
func toVersions(in interface{}) ([]*semver.Version, bool) {
if v, ok := toVersion(in); ok {
return []*semver.Version{v}, ok
}
Method DefFile.Filetype
has 5 return statements (exceeds 4 allowed). Open
Open
func (f *DefFile) Filetype() (string, error) {
if err := f.setup(); err != nil {
return "", err
}
Function varsFromFile
has 5 return statements (exceeds 4 allowed). Open
Open
func varsFromFile(varsFile string) (map[string]interface{}, error) {
vars := make(map[string]interface{})
if varsFile == "" {
return vars, nil
}
Method ResourceTypeMap.UnmarshalYAML
has 5 return statements (exceeds 4 allowed). Open
Open
func (ret *ResourceTypeMap) UnmarshalYAML(unmarshal func(v interface{}) error) error {
// Validate configuration
zero := ResourceType{}
whitelist, err := util.WhitelistAttrs(zero, util.YAML)
if err != nil {
Function WriteJSON
has 5 return statements (exceeds 4 allowed). Open
Open
func WriteJSON(filePath string, gossConfig GossConfig) error {
jsonData, err := marshal(gossConfig)
if err != nil {
return fmt.Errorf("failed to write %s: %s", filePath, err)
}
exported method BeSemverConstraintMatcher.NegatedFailureMessage should have comment or be unexported Open
Open
func (matcher *BeSemverConstraintMatcher) NegatedFailureMessage(actual interface{}) (message string) {
- Exclude checks
type JsonOneline should be JSONOneline Open
Open
type JsonOneline struct{}
- Exclude checks
exported function FormatOptions should have comment or be unexported Open
Open
func FormatOptions() []string {
- Exclude checks
exported method Rspecish.Output should have comment or be unexported Open
Open
func (r Rspecish) Output(w io.Writer, results <-chan []resource.TestResult,
- Exclude checks
exported method Command.Validate should have comment or be unexported Open
Open
func (c *Command) Validate(sys *system.System) []TestResult {
- Exclude checks
exported method DNS.ID should have comment or be unexported Open
Open
func (d *DNS) ID() string { return d.Host }
- Exclude checks