When using the List component, you are advised to specify both the width and height attributes.
@Component
struct Greeting {
@Builder myBuilder() {
List().width(10).height(10)
}
build() {
List() {
}.width(10).height(10);
}
}
@Builder function globalBuilder() {
List().width(10).height(10)
} @Component
struct Greeting {
@Builder myBuilder() {
// missing initialization of attribute 'height'
List().width(10)
}
build() {
// missing initialization of attribute 'width'
List().height(10);
}
}
@Builder function myBuilder() {
// missing initialization of attribute 'height'
List().width(10)
} plugin:@performance/all
For details about how to configure Code Linter check rules, see Code Linter.