-
Notifications
You must be signed in to change notification settings - Fork 0
Project setup
Demian Banakh edited this page Oct 14, 2022
·
6 revisions
- Clone the repo
- IDE-specific setup (?)
- Rider - no setup, just "Open" the root
sernick
folder - Visual Studio - ?
- Rider - no setup, just "Open" the root
- .NET is sometimes installed as a part of the IDE, but you can install a standalone .NET SDK as well: https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-6.0.402-windows-x64-installer
- Check that .NET is installed
$ dotnet --version
- In order to make sure you adhere to the linting we use on Github
$ dotnet tool install -g dotnet-format
$ # or install the latest build: I used this command
$ dotnet tool install -g dotnet-format --version "6.*" --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json
- Check that
dotnet-format
is installed successfully
$ dotnet format --version
- In order to check if there are any linter errors (doesn't modify any file):
$ dotnet format ./src/sernick --verify-no-changes
$ dotnet format ./test/sernickTest --verify-no-changes
- In order to format the code before you push (modifies broken files):
$ dotnet format ./src/sernick
$ dotnet format ./test/sernickTest
- You should be able to run the unit tests from your IDE, but just in case:
$ dotnet test ./test/sernickTest
git config --local core.hooksPath .hooks
This enables a script, which runs on every local commit you do, and which automatically fixes all lint errors in all staged files.