Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run dotnet format on the entire codebase (and enforce, going forward) #81

Merged
merged 2 commits into from
Apr 15, 2021

Conversation

mikeage
Copy link
Member

@mikeage mikeage commented Apr 4, 2021

Add dotnet-format to the checkers run by pre-commit.

By running pip install pre-commit && pre-commit install in your clone (python3 required), it will automatically run any newly modified files through dotnet-format. Additionally, as the style rules are in .editorconfig, they should be respected by most editors.

Once this is merged, the commit can be added to a .git-blame-ignore-revs file so that git blame from the command line will skip any changes made as part of this PR. See, for example, https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame for more information

@mikeage mikeage marked this pull request as draft April 4, 2021 07:15
@mikeage
Copy link
Member Author

mikeage commented Apr 4, 2021

Marked as draft since we don't want to merge this while we have open PRs

@@ -7,3 +7,6 @@ root = true
indent_style = space
indent_size = 2

# Based on Google's C# style guide

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 space indents will make this comment no longer true!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, this is from an earlier version where I tried to mimic the original style

There are a few small places where rider/resharper and dotnet-format
disagree; in this case, dotnet-format is the definitive version.
@mikeage mikeage marked this pull request as ready for review April 15, 2021 16:07
@mikeage mikeage merged commit fbe9985 into icosa-foundation:main Apr 15, 2021
@mikeage mikeage deleted the dotnet-format branch April 15, 2021 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants