Make sure you have read and understood PostSharp Engineering before reading this doc.
This repository contains centralized code-style configurations and scripts.
Unified base code-style is found under Standard
directory.
Other projects using slightly altered code-style configuration are in their own directories, respective to the name of the project.
-
Copy the
PostSharp.Engineering.CodeStyle
repo to your own repo intoeng/style
usingPostSharp.Engineering.BuildTools
, with the command:.\Build.ps1 codestyle pull
This tool will create a symlink for
.editorconfig
. -
Enable symlinks for your repo (edit
.git/config
). -
For each solution, in Rider, open Settings, choose "Manage Layers", select the team-shared layer, click on the
+
icon and then on "Open Settings File", then chooseeng/style/CommonStyle.DotSettings
. This step is required for code formatting usingBuild.ps1 codestyle format
, even if you are otherwise not using Rider.
The code quality configuration is configured in the following files:
.editorconfig
CommonStyle.DotSettings
(used by JetBrains tools)stylecop.json
- Commit all your changes. You cannot reformat a repo with uncommitted changes.
- Do
.\Build.ps1 codestyle format
from the repo root (seePostSharp.Engineering
).