<commit_before>package gorma

import "github.com/raphael/goa/design"

// Validate tests whether the StorageGroup definition is consistent
func (a *StorageGroupDefinition) Validate() *design.ValidationErrors {
	verr := new(goa.ValidationErrors)

	a.IterateStores(func(store *RelationalStoreDefinition) error {
		verr.Merge(store.Validate())
	})

	return verr.AsError()
}

// Validate tests whether the RelationalStore definition is consistent
func (a *RelationalStoreDefinition) Validate() *design.ValidationErrors {
	verr := new(goa.ValidationErrors)

	a.IterateModels(func(model *RelationalModelDefinition) error {
		verr.Merge(model.Validate())
	})

	return verr.AsError()
}

// Validate tests whether the RelationalModel definition is consistent
func (a *RelationalModelDefinition) Validate() *design.ValidationErrors {
	verr := new(goa.ValidationErrors)

	a.IterateFields(func(field *RelationalFieldDefinition) error {
		verr.Merge(field.Validate())
	})

	return verr.AsError()
}

// Validate tests whether the RelationalField definition is consistent
func (a *RelationalFieldDefinition) Validate() *design.ValidationErrors {
	verr := new(goa.ValidationErrors)

	return verr.AsError()
}<commit_msg>WIP Standalone DSL<commit_after>package gorma

import "github.com/raphael/goa/design"

// Validate tests whether the StorageGroup definition is consistent
func (a *StorageGroupDefinition) Validate() *design.ValidationErrors {
	verr := new(goa.ValidationErrors)

	a.IterateStores(func(store *RelationalStoreDefinition) error {
		verr.Merge(store.Validate())
	})

	return verr.AsError()
}

// Validate tests whether the RelationalStore definition is consistent
func (a *RelationalStoreDefinition) Validate() *design.ValidationErrors {
	verr := new(goa.ValidationErrors)

	a.IterateModels(func(model *RelationalModelDefinition) error {
		verr.Merge(model.Validate())
	})

	return verr.AsError()
}

// Validate tests whether the RelationalModel definition is consistent
func (a *RelationalModelDefinition) Validate() *design.ValidationErrors {

	verr := new(goa.ValidationErrors)

	a.IterateFields(func(field *RelationalFieldDefinition) error {
		verr.Merge(field.Validate())
	})

	return verr.AsError()
}

// Validate tests whether the RelationalField definition is consistent
func (a *RelationalFieldDefinition) Validate() *design.ValidationErrors {
	verr := new(goa.ValidationErrors)
	if field.Name == "" {
		verr.Add(a, "field name not defined")
	}
	return verr.AsError()
}
{'fraction_non_alphanumeric': 0.10787878787878788, 'fraction_numerical': 0.0, 'mean_word_length': 5.877777777777778, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4684980', 'n_tokens_mistral': 748, 'n_tokens_neox': 744, 'n_words': 177}