Skip to content

Commit

Permalink
Consolidate .editorconfig files
Browse files Browse the repository at this point in the history
  • Loading branch information
shenglol committed Jul 19, 2024
1 parent 25e9daf commit 336091a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 48 deletions.
37 changes: 14 additions & 23 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
root = true

# Code files
[*.{cs,csx,vb}]
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false # Two spaces in markdown is the same as a <br>.

[*.{cs,csx,vb}]
indent_size = 4

##############################################################################
########################## .NET Code Analysis Rules ##########################
##############################################################################

file_header_template = Copyright (c) Microsoft Corporation.\nLicensed under the MIT License.

Expand All @@ -21,7 +29,7 @@ csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
csharp_using_directive_placement = outside_namespace
csharp_prefer_braces = true

# IDE0005: [Using directive is unnecessary](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0005)
# IDE0005: [Using directive is unnecessary](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0005)
dotnet_diagnostic.IDE0005.severity = suggestion

# Require file header
Expand Down Expand Up @@ -247,7 +255,7 @@ dotnet_diagnostic.CA5399.severity = warning
dotnet_diagnostic.CA5400.severity = warning
# Do not use CreateEncryptor with non-default IV
dotnet_diagnostic.CA5401.severity = warning
# Use CreateEncryptor with the default IV
# Use CreateEncryptor with the default IV
dotnet_diagnostic.CA5402.severity = warning
# Do not hard-code certificate
dotnet_diagnostic.CA5403.severity = warning
Expand All @@ -266,20 +274,3 @@ dotnet_diagnostic.CA1851.severity = warning
# Override code quality rules for test projects
[{src/Bicep.Core.Samples/*.cs,src/*Test*/*.cs}]
dotnet_diagnostic.CA1851.severity = suggestion

[*.{ts,tsx,js}]
indent_style = space
end_of_line = lf
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# Xml config files
[.resx]
indent_style = space
end_of_line = lf
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
8 changes: 0 additions & 8 deletions src/Bicep.Cli.E2eTests/.editorconfig

This file was deleted.

9 changes: 0 additions & 9 deletions src/vscode-bicep-ui/.editorconfig

This file was deleted.

8 changes: 0 additions & 8 deletions src/vscode-bicep/.editorconfig

This file was deleted.

0 comments on commit 336091a

Please sign in to comment.