Open bgimby opened 5 months ago
golines will shorten a declaration like this:
foo := longlistfunc(bigarg, otherbigarg, verylongarg, veryverylongarg, veryveryverylongarg, extremelylongarg)
to
foo := longlistfunc( bigarg, otherbigarg, verylongarg, veryverylongarg, veryveryverylongarg, extremelylongarg, )
I would expect it to similarly shorten a declaration like
foo := longlistfunc(bigarg, otherbigarg, verylongarg, veryverylongarg, veryveryverylongarg, extremelylongarg)[0]
foo := longlistfunc( bigarg, otherbigarg, verylongarg, veryverylongarg, veryveryverylongarg, extremelylongarg, )[0]
but it is left alone. This appears to be due to formatExpr not supporting index expressions. It results in a debug message like
Got an expression type that can't be shortened: *dst.IndexExpr
Also seeing this bug; it's very confusing, and causing issues with the use of the golangci-lint linter lll.
golangci-lint
lll
@yolken-segment - Is there anything preventing a fix for this issue from moving forward?
golines will shorten a declaration like this:
to
I would expect it to similarly shorten a declaration like
to
but it is left alone. This appears to be due to formatExpr not supporting index expressions. It results in a debug message like