smithy-lang / smithy-dafny

Apache License 2.0
10 stars 8 forks source link

Non-idiomatic code generation #130

Open codyroux opened 1 year ago

codyroux commented 1 year ago

Currently a generated method looks something like this:

 method UpdateWorkflow ( config: InternalConfig,  input: UpdateWorkflowRequest )

The spaces before and after the parens, and the double space after the comma are not idiomatic in Dafny: they should be eliminated if we want to generate idiomatic code.

robin-aws commented 1 year ago

Fair point but definitely lower priority than incorrect or incomprehensible code generation. :)

robin-aws commented 1 year ago

I'm actually more bothered by the lack of indentation, as that impacts readability quite a bit more.

robin-aws commented 1 year ago

I wonder if the most efficient solution is to wait for dafny format to deal with this instead, and run it post-hoc.

texastony commented 1 year ago

I wonder if the most efficient solution is to wait for dafny format to deal with this instead, and run it post-hoc.

I would love for dotnet format to run as well...