Enforce code style with dotnet format #532
Enforce code style with dotnet format #532gregkalapos merged 5 commits intoelastic:masterfrom gregkalapos:DotNetFormat
Conversation
kuisathaverat
left a comment
There was a problem hiding this comment.
when you remove the tab from the GitHub notification LGTM :)
Mpdreamz
left a comment
There was a problem hiding this comment.
This looks good to me.
It would be good for .ci to start moving to local .NET tools when this repository moves over to .NET Core 3.0 so that the build stays repeatable. cc @kuisathaverat
probably we'd have to have two builds, one for .NET 2.x, and another for .NET 3.x to ensure compatibility |
For compatibility actually we'll also need some 2.x and 3.x projects that use the agent. Now I'm not totally sure, but I think if we have 2.x and 3.x projects that test the agent then 1 build is enough, because that'd pull the corresponding .NET Core version anyway. I opened #546 |
Co-Authored-By: Ivan Fernandez Calvo <kuisathaverat@users.noreply.github.com>
Co-Authored-By: Ivan Fernandez Calvo <kuisathaverat@users.noreply.github.com>
Addressing #510.
What's new:
With
dotnet format --dry-run --checkwe make sure all our C# code is formatted the way it should be formatted according to our.editorconfigfile. If that is not the case thendotnet formatreturns with non-zero exit code.I added this step only to the Linux build - I think that's enough, no need to run it on multiple OSs. Let me know if there is a better place for it.
Next step:
This build currently fails because we have code style violations - those are addressed in #535 (opened a separate PR, otherwise it'd be hard to review this), so that'll be merged first. #536 shows the status after #535 is merged into that branch:Update: code cleanup done, this PR branch should be also ok.