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.CodeStylerepo to your own repo intoeng/styleusingPostSharp.Engineering.BuildTools, with the command:.\Build.ps1 codestyle pullThis 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:
.editorconfigCommonStyle.DotSettings(used by JetBrains tools)stylecop.json
- Commit all your changes. You cannot reformat a repo with uncommitted changes.
- Do
.\Build.ps1 codestyle formatfrom the repo root (seePostSharp.Engineering).