Skip to content

Latest commit

 

History

History

Source

Cogworks Examine Tweaks

Project Code Version License


Code Style

We are using combination of fallow tools:

You need to manual install those packages:

  • StyleCop.Analyzers version 1.1.118
  • Microsoft.CodeAnalysis.FxCopAnalyzers version 3.3.1
  • Microsoft.CodeQuality.Analyzers version 3.3.1
  • Microsoft.NetCore.Analyzers version 3.3.1
  • Microsoft.NetFramework.Analyzers version 3.3.1
  • Microsoft.CodeAnalysis.VersionCheckAnalyzer version 3.3.1
  • SmartanAlyzers.ExceptionAnalyzer version 1.0.10
How to modify for custom project (override)

For overriding style for dedicated project we need to do the fallowing:

EditorConfig:

  1. Overriding for all directories

You need to create .editorconfig in root to apply for all directories (if you want to do that for all pages add .editorconfig file in same place where sln file is located).

  1. Overriding in dedicated directory f.e. generated models directory

You need to create .editorconfig in dedicated directory with all overridden rules.

  1. Overriding rules for dedicated file extensions

You need to create .editorconfig and inside it using templating:

[*.someExtension.cs]
# here the rules for this file extension

More configuration details in files:

Tests

Unit Tests

Naming Convention

Class names:

public class (TestedClassName)Tests

Methods names:

public void/Task/ValueTask Should_ExpectedBehaviour_When_StateUnderTest()

Integration Tests

Naming Convention
 public class (ClassName)Specs
 {
     //general configuration goes here


     public class Given_SomeArrangements : (ClassName)Specs
     {
         public Task/void Should_SomeAction_SomeOutcome
     }
 }