Linting
#
Rules we enforceIndentation is 4 spaces for tab
No whitespace
Public objects should be Pascal Case (e.g. PascalCase)
Local objects should be Camel Case (e.g. camelCase)
Class objects should be prefixed with an underscore
Using
directives should be outside the namespaceNo unused
using
directivesOne new line at the end of every file
One class for a file
Prefer the
language
keyword for local objects and member accessRequire accessibility modifiers for fields
No unused parameters for non-public methods
Use
var
where possibleBrackets on a new line
Comments on their own line
No writing to console
#
ToolsWe have chosen to use .editorconfig
with dotnet format
#
Dotnet Format#
Stylecop.analysersNeed to make a .ruleset file + stylecop.json to implement rules
Integrates with build
#
Resharper- As an alternative to the paid version, there is a free command line tool but I’m assuming it wont integrate with peoples editors who aren’t using rider https://www.jetbrains.com/help/resharper/CleanupCode.html