Universal-Variability-Language / uvl-lsp

Language server protocol for the Universal Variability Language (UVL)
MIT License
10 stars 4 forks source link

Add check for Non-Numeric/Invalid Entries in Aggregate (of Attributes) Functions (sum/avg) #97

Closed TobiUUlm closed 1 year ago

TobiUUlm commented 1 year ago

fixes #80 Sample for testing:

features
    Bike
        optional
            Front {Weight 2}
            Back {Weight 1.5}
            Dynamo {Weight 3, Manufacturer 'sample'}
constraints
    avg(Weight) > 0
    avg(invalidattr) > 0
    avg(Manufacturer) > 0
    sum(Weight) > 0
    sum(invalidattr) > 0
    sum(Manufacturer) > 0
felixrieg commented 1 year ago

LGTM

When using a attribute from an imported uvl file I still get the error message. But since this is also the behavior on main, maybe this is a separate issue