func()

in internal/platform/qdyaml/yaml.go [403:452]


func (q *QodanaYaml) Sort() *QodanaYaml {
	sort.Slice(
		q.Includes, func(i, j int) bool {
			return strutil.Lower(q.Includes[i].Name) < strutil.Lower(q.Includes[j].Name)
		},
	)
	sort.Slice(
		q.Excludes, func(i, j int) bool {
			return strutil.Lower(q.Excludes[i].Name) < strutil.Lower(q.Excludes[j].Name)
		},
	)
	for _, rule := range q.LicenseRules {
		sort.Slice(
			rule.Keys, func(i, j int) bool {
				return strutil.Lower(rule.Keys[i]) < strutil.Lower(rule.Keys[j])
			},
		)
		sort.Slice(
			rule.Allowed, func(i, j int) bool {
				return strutil.Lower(rule.Allowed[i]) < strutil.Lower(rule.Allowed[j])
			},
		)
		sort.Slice(
			rule.Prohibited, func(i, j int) bool {
				return strutil.Lower(rule.Prohibited[i]) < strutil.Lower(rule.Prohibited[j])
			},
		)
	}
	sort.Slice(
		q.DependencyIgnores, func(i, j int) bool {
			return strutil.Lower(q.DependencyIgnores[i].Name) < strutil.Lower(q.DependencyIgnores[j].Name)
		},
	)
	sort.Slice(
		q.DependencyOverrides, func(i, j int) bool {
			return strutil.Lower(q.DependencyOverrides[i].Name) < strutil.Lower(q.DependencyOverrides[j].Name)
		},
	)
	sort.Slice(
		q.CustomDependencies, func(i, j int) bool {
			return strutil.Lower(q.CustomDependencies[i].Name) < strutil.Lower(q.CustomDependencies[j].Name)
		},
	)
	sort.Slice(
		q.Plugins, func(i, j int) bool {
			return strutil.Lower(q.Plugins[i].Id) < strutil.Lower(q.Plugins[j].Id)
		},
	)
	return q
}