refractor(aa): ensure methods order in rules definitions.

This commit is contained in:
Alexandre Pujol 2024-06-25 19:56:36 +01:00
parent 272072d2a5
commit 880f0ef37e
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
19 changed files with 310 additions and 310 deletions

View file

@ -69,6 +69,18 @@ func newHeader(rule rule) (Header, error) {
}, nil
}
func (p *Profile) Kind() Kind {
return PROFILE
}
func (p *Profile) Constraint() constraint {
return blockKind
}
func (p *Profile) String() string {
return renderTemplate(p.Kind(), p)
}
func (r *Profile) Validate() error {
if err := validateValues(r.Kind(), tokFLAGS, r.Flags); err != nil {
return fmt.Errorf("profile %s: %w", r.Name, err)
@ -84,18 +96,6 @@ func (r *Profile) Compare(other Rule) int {
return compare(r.Attachments, o.Attachments)
}
func (p *Profile) String() string {
return renderTemplate(p.Kind(), p)
}
func (p *Profile) Constraint() constraint {
return blockKind
}
func (p *Profile) Kind() Kind {
return PROFILE
}
func (p *Profile) Merge(other Rule) bool {
slices.Sort(p.Flags)
p.Flags = slices.Compact(p.Flags)