Skip to content

Project setup

Demian Banakh edited this page Oct 14, 2022 · 6 revisions

General

  1. Clone the repo
  2. IDE-specific setup (?)
    • Rider - no setup, just "Open" the root sernick folder
    • Visual Studio - ?
  3. .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
  4. Check that .NET is installed $ dotnet --version
  5. 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
  1. Check that dotnet-format is installed successfully
$ dotnet format --version
  1. 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
  1. In order to format the code before you push (modifies broken files):
$ dotnet format ./src/sernick
$ dotnet format ./test/sernickTest
  1. You should be able to run the unit tests from your IDE, but just in case:
$ dotnet test ./test/sernickTest

Autolinting (optional)

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.

Clone this wiki locally