feat(aa): add implementation of the new rule methods.

This commit is contained in:
Alexandre Pujol 2024-06-29 22:27:39 +01:00
parent 8b24f3521d
commit 0e0f87611a
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
19 changed files with 380 additions and 2 deletions

View file

@ -53,6 +53,12 @@ func (r *Comment) Merge(other Rule) bool {
return false // Never merge comments
}
func (r *Comment) Lengths() []int {
return []int{} // No len for comments
}
func (r *Comment) setPaddings(max []int) {} // No paddings for comments
type Abi struct {
Base
Path string
@ -109,6 +115,12 @@ func (r *Abi) Merge(other Rule) bool {
return false // Never merge abi
}
func (r *Abi) Lengths() []int {
return []int{} // No len for abi
}
func (r *Abi) setPaddings(max []int) {} // No paddings for abi
type Alias struct {
Base
Path string
@ -157,6 +169,12 @@ func (r *Alias) Merge(other Rule) bool {
return false // Never merge alias
}
func (r *Alias) Lengths() []int {
return []int{} // No len for alias
}
func (r *Alias) setPaddings(max []int) {} // No paddings for alias
type Include struct {
Base
IfExists bool
@ -234,6 +252,12 @@ func (r *Include) Merge(other Rule) bool {
return false // Never merge include
}
func (r *Include) Lengths() []int {
return []int{} // No len for include
}
func (r *Include) setPaddings(max []int) {} // No paddings for include
type Variable struct {
Base
Name string
@ -305,3 +329,9 @@ func (r *Variable) Merge(other Rule) bool {
}
return false
}
func (r *Variable) Lengths() []int {
return []int{} // No len for variable
}
func (r *Variable) setPaddings(max []int) {} // No paddings for variable