adr-9: decided Discussion
decided 2024-03-07

Formatting

Establishing some minimal style enforcement

Decision

We want to lean into existing tools to take the argument and personal tastes out of applying formatting. This helps to avoid nitpicking of PRs, especially if it happens automatically and consistently, before the PR is raised.

EditorConfig

EditorConfig. We have an .editorconfig file to control basic spacing settings. The initial rules are:

Making use of these settings

Visual Studio or JetBrains Rider apply these settings on new code automatically. Visual Studio Code has support via a plug-in.

If this is set up correctly, it should happen as you edit.

dotnet format will also follow .editorconfig rules.

Pull Request review

We do not intent to enforce formatting as part of PR review at present. It will happen automatically beforehand, or afterwards as part of a tidy-up.

Future steps

We may look into more use of these tools later, in these directions

Discussion

See the original PR for some additional context.

And see the preceding PR that prompted this decision.