Skip to content

Commit

Permalink
(GitToolsGH-285) Stylecop and editorconfig all the things
Browse files Browse the repository at this point in the history
  • Loading branch information
gep13 committed Dec 29, 2020
1 parent 5075de1 commit dfaf0b8
Show file tree
Hide file tree
Showing 58 changed files with 517 additions and 538 deletions.
151 changes: 110 additions & 41 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,41 +1,110 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://EditorConfig.org

root = true

[*]
charset = utf-8 # Just for consistency
# Indentation and spacing
indent_size = 4
indent_style = space
tab_width = 4

# New line preferences
end_of_line = crlf
insert_final_newline = false
trim_trailing_whitespace = true

[*.sh]
end_of_line = lf

[*.sln]
# Visual studio defaults
insert_final_newline = true
indent_style = tab

[*.md]
trim_trailing_whitespace = false
insert_final_newline = true # Conflicts with markdownlint when false
indent_size = 2 # Incorrect indentation happens when this is not 2

[*.{yml,yaml}]
indent_size = 2 # Incorrect indentation happens when this is not 2

[*.ps1]
charset = utf-8-bom
indent_style = space
indent_size = 2

[*.js]
indent_style = tab
indent_size = 2
root = false

[*.cs]
# IDE0055: Fix formatting
dotnet_diagnostic.IDE0055.severity = warning

# SA1101: Prefix local calls with this
dotnet_diagnostic.SA1101.severity = none

# SA1633: File should have header
dotnet_diagnostic.SA1633.severity = none

# SA1200: Using directive should appear within a namespace declaration
dotnet_diagnostic.SA1200.severity = error

# SA1201: Elements should appear in the correct order
dotnet_diagnostic.SA1201.severity = none

# SA1202: Public members should come before private members
dotnet_diagnostic.SA1202.severity = none

# SA1210: Using directives should be ordered alphabetically by the namespaces
dotnet_diagnostic.SA1210.severity = error

# SA1309: Field names should not begin with underscore
dotnet_diagnostic.SA1309.severity = none

# SA1310: Field names should not contain an underscore
dotnet_diagnostic.SA1310.severity = none

# SA1404: Code analysis suppressions should have justification
dotnet_diagnostic.SA1404.severity = none

# SA1507: Code should not contain multiple blank lines in a row
dotnet_diagnostic.SA1507.severity = error

# SA1516: Elements should be separated by a blank line
dotnet_diagnostic.SA1516.severity = none

# CA1303: Do not pass literals as localized parameters
dotnet_diagnostic.CA1303.severity = none

# CSA1204: Static members should appear before non-static members
dotnet_diagnostic.SA1204.severity = none

#SA1413: Use trailing comma in multi-line initializers
dotnet_diagnostic.SA1413.severity = error

# IDE0052: Remove unread private members
dotnet_diagnostic.IDE0052.severity = warning

# IDE0063: Use simple 'using' statement
csharp_prefer_simple_using_statement = false:suggestion

# IDE0018: Variable declaration can be inlined
dotnet_diagnostic.IDE0018.severity = warning

# SA1623: The property's documentation summary text should begin with: 'Gets or sets'
dotnet_diagnostic.SA1623.severity = warning

# SA1625: Element documenation should not be copied and pasted
dotnet_diagnostic.SA1625.severity = none

# IDE0005: Using directive is unnecessary
dotnet_diagnostic.IDE0005.severity = warning

# SA1117: Parameters should be on same line or separate lines
dotnet_diagnostic.SA1117.severity = none

# SA1122: Use string.Empty for empty strings
dotnet_diagnostic.SA1122.severity = error

# SA1404: Code analysis suppression should have justification
dotnet_diagnostic.SA1404.severity = none

# SA1101: Prefix local calls with this
dotnet_diagnostic.SA1101.severity = none

# SA1633: File should have header
dotnet_diagnostic.SA1633.severity = none

# SA1638: File header file name documentation should match file name
dotnet_diagnostic.SA1638.severity = error

# SA1649: File name should match first type name
dotnet_diagnostic.SA1649.severity = none

# SA1402: File may only contain a single type
dotnet_diagnostic.SA1402.severity = none

# CA1814: Prefer jagged arrays over multidimensional
dotnet_diagnostic.CA1814.severity = none

# RCS1194: Implement exception constructors.
dotnet_diagnostic.RCS1194.severity = none

# CA1032: Implement standard exception constructors
dotnet_diagnostic.CA1032.severity = none

# CA1826: Do not use Enumerable methods on indexable collections. Instead use the collection directly
dotnet_diagnostic.CA1826.severity = none

# RCS1079: Throwing of new NotImplementedException.
dotnet_diagnostic.RCS1079.severity = warning

# RCS1057: Add empty line between declarations.
dotnet_diagnostic.RCS1057.severity = none

# IDE0004: Remove Unnecessary Cast
dotnet_diagnostic.IDE0004.severity = warning
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{
"editor.rulers": [80],
"cSpell.words": [
"Usings",
"addasset",
"buildartifacts",
"choco",
"gitreleasemanager",
"nupkg",
"psake",
"readonly",
"releasenotes",
"showconfig"
]
],
"omnisharp.enableEditorConfigSupport": true,
"omnisharp.enableRoslynAnalyzers": true
}
Loading

0 comments on commit dfaf0b8

Please sign in to comment.