Skip to content

Commit

Permalink
Increase max line length for generated client code (#2835)
Browse files Browse the repository at this point in the history
This PR increases the max line length on generated client code to reduce
the likelihood of rustfmt failing to format files.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
  • Loading branch information
jdisanti authored Jul 10, 2023
1 parent 3a133b1 commit 705f0f0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ class ClientCodegenVisitor(
),
)
try {
"cargo fmt".runCommand(fileManifest.baseDir, timeout = settings.codegenConfig.formatTimeoutSeconds.toLong())
// use an increased max_width to make rustfmt fail less frequently
"cargo fmt -- --config max_width=150".runCommand(fileManifest.baseDir, timeout = settings.codegenConfig.formatTimeoutSeconds.toLong())
} catch (err: CommandFailed) {
logger.warning("Failed to run cargo fmt: [${service.id}]\n${err.output}")
}
Expand Down

0 comments on commit 705f0f0

Please sign in to comment.