func newRule(
	id string,
	categories []string,
	purpose string,
	checkFunc CheckFunc,
) *Rule {
	c := make([]string, len(categories))
	copy(c, categories)
	sort.Slice(
		c,
		func(i int, j int) bool {
			return categoryLess(c[i], c[j])
		},
	)
	return &Rule{
		id:         id,
		categories: c,
		purpose:    "Checks that " + purpose + ".",
		checkFunc:  checkFunc,
	}
}
// newRule returns a new Rule.
//
// Categories will be sorted and purpose will have "Checks that "
// prepended and "." appended.
newRule returns a new Rule.

Categories will be sorted and purpose will have "Checks that "
prepended and "." appended.
// newRule returns a new Rule . // // Categories will be sorted and purpose will have " Checks that " // prepended and " . " appended .
func newRule(
	id string,
	categories []string,
	purpose string,
	checkFunc CheckFunc,
) *Rule {
	c := make([]string, len(categories))
	copy(c, categories)
	sort.Slice(
		c,
		func(i int, j int) bool {
			return categoryLess(c[i], c[j])
		},
	)
	return &Rule{
		id:         id,
		categories: c,
		purpose:    "Checks that " + purpose + ".",
		checkFunc:  checkFunc,
	}
}
func newRule ( id string , categories [ ] string , purpose string , checkFunc CheckFunc , ) * Rule { c := make ( [ ] string , len ( categories ) ) copy ( c , categories ) sort . Slice ( c , func ( i int , j int ) bool { return categoryLess ( c [ i ] , c [ j ] ) } , ) return & Rule { id : id , categories : c , purpose : " " + purpose + " " , checkFunc : checkFunc , } }
newRule returns a new Rule.
newRule returns a new Rule .