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

Integrate dotnet format check into GH pipeline #11

Merged
merged 2 commits into from
May 13, 2024

Conversation

michalJakubis
Copy link
Contributor

@michalJakubis michalJakubis commented Apr 29, 2024

Motivation

Although we already require execution of dotnet format as one of the steps to successful contribution we do not verify that contributors have actually executed the formatting command before submitting to the repository. As a result, effective automation became impossible, as those using the dotnet format would see changes to files that were not touched by themselves during implementation.

Therefore, this PR adds dotnet format check directly to the pipeline.

Checklist

  • Code follows coding conventions held in this repo
  • Automated tests have been added
  • Tests are passing
  • Docs have been updated (if applicable)
  • Temporary settings (e.g. variables used during development and testing) have been reverted to defaults

How to test

If manual testing is required, what are the steps?

@seangwright
Copy link
Member

Can you also add the format call changes to the VS Code tasks and update the Contributing instructions like you did in Kentico.Xperience.Lucene?

The repo template does have an examples folder, even though it is empty

@michalJakubis
Copy link
Contributor Author

Can you also add the format call changes to the VS Code tasks and update the Contributing instructions like you did in Kentico.Xperience.Lucene?

The repo template does have an examples folder, even though it is empty

I originally considered Lucene a special exception because of the recent split into multiple projects, but now I see that the approach I had to apply to Lucene also applies to single project integrations and includes test files in formatting as well. So I ended up modifying the way we implement the dotnet format here, so that we check all files except those in the example folder.

@michalJakubis michalJakubis requested review from seangwright and removed request for seangwright May 13, 2024 08:14
@michalJakubis michalJakubis merged commit efa1b38 into main May 13, 2024
2 checks passed
@michalJakubis michalJakubis deleted the feat/dotnet-format-check branch May 13, 2024 12:31
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.

2 participants