DanielGavin / ols

Language server for Odin
MIT License
417 stars 62 forks source link

odinfmt - breaks code with mixed use of params and named params and variadic arguments #251

Closed iansimonson closed 11 months ago

iansimonson commented 11 months ago

Given the following:

log_debugf :: proc(format: string, args: ..any, loc := #caller_location) {
    logf(.Debug, format, ..args, loc = loc)
}

Formatting this with OLS produces:

log_debugf :: proc(format: string, args: ..any, loc := #caller_location) {
    logf(.Debug, format, args, ..loc = loc)
}

Moving the .. onto the named loc, breaking the code

DanielGavin commented 11 months ago

Fixed.