Closed notJoon closed 2 months ago
Implemented the formatter for the std.Emit funcrtion.
std.Emit
Ensure that key-value pairs are only on the one line at a time when there are more than 3 parameters.
Problematic code:
package main import "std" func main() { std.Emit( "OwnershipChange", "newOwner", newOwner.String(), "oldOwner", oldOwner.String(), "anotherOwner", anotherOwner.String(), ) }
linting result:
error: emit-format --> testdata/emit0.gno 6 | std.Emit( 7 | "OwnershipChange", 8 | "newOwner", newOwner.String(), 9 | "oldOwner", 10 | oldOwner.String(), 11 | "anotherOwner", anotherOwner.String(), 12 | ) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Consider formatting std.Emit call for better readability Suggestion: 6 | std.Emit( 7 | "OwnershipChange", 8 | "newOwner", newOwner.String(), 9 | "oldOwner", oldOwner.String(), 10 | "anotherOwner", anotherOwner.String(), 11 | )
Description
Implemented the formatter for the
std.Emit
funcrtion.Ensure that key-value pairs are only on the one line at a time when there are more than 3 parameters.
Example
Problematic code:
linting result: