Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore: configure editorconfig rule #268

Merged
merged 2 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 40 additions & 18 deletions src/Eppie.CLI/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,29 @@ root = true
#### All files ####
[*]

charset = utf-8

## Indentation and spacing
indent_style = space
tab_width = 4
indent_size = 4
trim_trailing_whitespace = true

## New line preferences
end_of_line = unset
end_of_line = crlf
insert_final_newline = true


#### Specific files ####

## Code files
[*.{cs,csx,vb,vbx}]
indent_size = 4
insert_final_newline = true
charset = utf-8-bom

## C++ Files
[*.{cpp,h,in}]
indent_size = 4
curly_bracket_next_line = true
indent_brace_style = Allman

## Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
## Yaml files
[*.{yml,yaml}]
indent_size = 2

## Xml build files
[*.builds]
## Json files
[*.{json,slnf}]
indent_size = 2
end_of_line = lf

## Xml files
[*.{xml,stylecop,resx,ruleset}]
Expand All @@ -51,6 +42,24 @@ indent_size = 2
[*.{props,targets,config,nuspec}]
indent_size = 2

## Json config files
[.vsconfig]
indent_size = 2
end_of_line = lf

## Solution files
[*.sln]
indent_style = tab
indent_size = 2

## Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
indent_size = 2

## Xml build files
[*.builds]
indent_size = 2

## Shell scripts
[*.{sh,bash}]
end_of_line = lf
Expand All @@ -63,6 +72,17 @@ end_of_line = crlf
# Double trailing spaces can be used for BR tags, and other instances are enforced by Markdownlint
trim_trailing_whitespace = false

## C++ Files
[*.{cpp,h,in}]
curly_bracket_next_line = true
indent_brace_style = Allman
end_of_line = unset

## C# Files
[*.{cs,csx}]
# EOL should be normalized by Git. See https://github.com/dotnet/format/issues/1099
end_of_line = unset

## Generated files
#[*{.generated.cs,.g.cs}]
#generated_code = true
Expand Down Expand Up @@ -141,7 +161,8 @@ csharp_prefer_braces = true:warning # IDE0011: A
csharp_style_namespace_declarations = block_scoped:warning # IDE0160: Use block-scoped namespace, IDE0161: Use file-scoped namespace
csharp_style_prefer_method_group_conversion = true:warning # IDE0200: Remove unnecessary lambda expression
csharp_style_prefer_top_level_statements = true:silent # IDE0210: Convert to top-level statements, IDE0211: Convert to 'Program.Main' style program
csharp_style_prefer_primary_constructors = true:error # IDE0290 Use primary constructor [note: C# 12 feature]
csharp_style_prefer_primary_constructors = true:error # IDE0290: Use primary constructor [note: C# 12+ feature]
csharp_prefer_system_threading_lock = true:error # IDE0330: Prefer 'System.Threading.Lock' [note: C# 13+ feature]

## Expression-bodied members
csharp_style_expression_bodied_methods = false:warning # IDE0022: Use expression body for methods
Expand Down Expand Up @@ -229,6 +250,7 @@ dotnet_style_prefer_inferred_tuple_names = true:warning
dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning # IDE0037: Use inferred member names
dotnet_style_prefer_compound_assignment = true:warning # IDE0054: Use compound assignment, IDE0074: Use coalesce compound assignment
dotnet_style_prefer_simplified_interpolation = true:warning # IDE0071: Simplify interpolation
dotnet_style_prefer_collection_expression = when_types_loosely_match:warning # IDE0300: Use collection expression for array [note: .NET 9+ feature]
dotnet_style_namespace_match_folder = true:warning # IDE0130: Namespace does not match folder structure
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed:warning # IDE0220: Add explicit cast in foreach loop

Expand Down
2 changes: 1 addition & 1 deletion src/Eppie.CLI/Eppie.CLI/Common/MailServer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
2 changes: 1 addition & 1 deletion src/Eppie.CLI/Eppie.CLI/Menu/Actions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
2 changes: 1 addition & 1 deletion src/Eppie.CLI/Eppie.CLI/Menu/MainMenu.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
2 changes: 1 addition & 1 deletion src/Eppie.CLI/Eppie.CLI/Menu/MenuCommand.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
2 changes: 1 addition & 1 deletion src/Eppie.CLI/Eppie.CLI/Options/AuthorizationOptions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
2 changes: 1 addition & 1 deletion src/Eppie.CLI/Eppie.CLI/Options/ConsoleOptions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
2 changes: 1 addition & 1 deletion src/Eppie.CLI/Eppie.CLI/Options/MailOptions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
2 changes: 1 addition & 1 deletion src/Eppie.CLI/Eppie.CLI/Options/OptionConverter.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
2 changes: 1 addition & 1 deletion src/Eppie.CLI/Eppie.CLI/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
2 changes: 1 addition & 1 deletion src/Eppie.CLI/Eppie.CLI/Services/Application.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
2 changes: 1 addition & 1 deletion src/Eppie.CLI/Eppie.CLI/Services/ApplicationLifetime.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
2 changes: 1 addition & 1 deletion src/Eppie.CLI/Eppie.CLI/Services/ApplicationMenuLoop.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
2 changes: 1 addition & 1 deletion src/Eppie.CLI/Eppie.CLI/Services/AuthorizationProvider.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
2 changes: 1 addition & 1 deletion src/Eppie.CLI/Eppie.CLI/Services/CoreProvider.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
2 changes: 1 addition & 1 deletion src/Eppie.CLI/Eppie.CLI/Services/ResourceLoader.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
2 changes: 1 addition & 1 deletion src/Eppie.CLI/Eppie.CLI/Services/TokenRefresher.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
2 changes: 1 addition & 1 deletion src/Eppie.CLI/Eppie.CLI/Tools/LoggerExtension.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ---------------------------------------------------------------------------- //
// ---------------------------------------------------------------------------- //
// //
// Copyright 2024 Eppie (https://eppie.io) //
// //
Expand Down
Loading