refractor(aa): ensure methods order in rules definitions.
This commit is contained in:
parent
272072d2a5
commit
880f0ef37e
19 changed files with 310 additions and 310 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue