Skip to content

Commit

Permalink
Add EditorConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
jerone committed Aug 18, 2024
1 parent ed19993 commit 6796913
Show file tree
Hide file tree
Showing 13 changed files with 99 additions and 33 deletions.
6 changes: 2 additions & 4 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
"tools": {
"csharpier": {
"version": "0.29.0",
"commands": [
"dotnet-csharpier"
],
"commands": ["dotnet-csharpier"],
"rollForward": false
}
}
}
}
68 changes: 68 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
tab_width = 4
end_of_line = lf # To allow compiling code on CI.
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
indent_style = space
indent_size = 4

[*.yml]
indent_style = space
indent_size = 2

[*.{cshtml,htm,html,razor}]
indent_style = tab
indent_size = tab
tab_width = 4

[*.{asax,ascx,aspx,axaml,cs,master,paml,skin,vb,xaml,xamlx,xoml}]
indent_style = space
indent_size = 4
tab_width = 4

[*.{appxmanifest,axml,build,config,csproj,dbml,discomap,dtd,jsproj,lsproj,njsproj,nuspec,proj,props,resw,resx,StyleCop,targets,tasks,vbproj,xml,xsd}]
indent_style = space
indent_size = 2
tab_width = 2

[*.{cs,vb}]

# Microsoft .NET properties
csharp_new_line_before_members_in_object_initializers = false
csharp_preferred_modifier_order = public, private, protected, internal, file, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async, required:suggestion
csharp_style_prefer_utf8_string_literals = true:suggestion
csharp_style_var_elsewhere = true:suggestion
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:none
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
dotnet_style_qualification_for_event = false:suggestion
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion

# ReSharper inspection severities
resharper_arrange_redundant_parentheses_highlighting = hint
resharper_arrange_this_qualifier_highlighting = hint
resharper_arrange_type_member_modifiers_highlighting = hint
resharper_arrange_type_modifiers_highlighting = hint
resharper_built_in_type_reference_style_for_member_access_highlighting = hint
resharper_built_in_type_reference_style_highlighting = hint
resharper_redundant_base_qualifier_highlighting = warning
resharper_suggest_var_or_type_built_in_types_highlighting = hint
resharper_suggest_var_or_type_elsewhere_highlighting = hint
resharper_suggest_var_or_type_simple_types_highlighting = hint
2 changes: 1 addition & 1 deletion .vsconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
"extensions": [
"https://marketplace.visualstudio.com/items?itemName=csharpier.CSharpier"
]
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DevToys.Api;
using DevToys.Api;
using static DevToys.Api.GUI;
using R = Jvw.DevToys.SemverCalculator.Resources.Resources;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text.Json;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Jvw.DevToys.SemverCalculator.Converters;
Expand Down
2 changes: 1 addition & 1 deletion Jvw.DevToys.SemverCalculator/Enums/GridColumn.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Jvw.DevToys.SemverCalculator.Enums;
namespace Jvw.DevToys.SemverCalculator.Enums;

internal enum GridColumn
{
Expand Down
2 changes: 1 addition & 1 deletion Jvw.DevToys.SemverCalculator/Enums/GridRow.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Jvw.DevToys.SemverCalculator.Enums;
namespace Jvw.DevToys.SemverCalculator.Enums;

internal enum GridRow
{
Expand Down
2 changes: 1 addition & 1 deletion Jvw.DevToys.SemverCalculator/Gui.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.ComponentModel.Composition;
using System.ComponentModel.Composition;
using System.Net;
using System.Text.Json;
using DevToys.Api;
Expand Down
2 changes: 1 addition & 1 deletion Jvw.DevToys.SemverCalculator/Models/PackageJson.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Jvw.DevToys.SemverCalculator.Converters;

namespace Jvw.DevToys.SemverCalculator.Models;
Expand Down
2 changes: 1 addition & 1 deletion Jvw.DevToys.SemverCalculator/Models/Settings.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DevToys.Api;
using DevToys.Api;

namespace Jvw.DevToys.SemverCalculator.Models;

Expand Down
4 changes: 2 additions & 2 deletions Jvw.DevToys.SemverCalculator/Pack/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Why

All files in this folder are required to create a valid NuGet package.
They are automatically included in the NuGet package when the project is built.
They are automatically included in the NuGet package when the project is built.
See the `.csproj` file how.

## Semver

Semver is a dependency of this package.
Semver is a dependency of this package.
The NuGet package does not come with a `.pdb` and `.xml` (documentation) file.
Both of which are required to build a valid NuGet package (for Source Link & Deterministic builds).
These files can be downloaded here: https://www.nuget.org/packages/Semver/2.3.0
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.ComponentModel.Composition;
using System.ComponentModel.Composition;
using DevToys.Api;

namespace Jvw.DevToys.SemverCalculator.Resources;
Expand Down
36 changes: 18 additions & 18 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"version": "0.2",
"ignorePaths": [],
"dictionaryDefinitions": [],
"dictionaries": [],
"words": [
"APIKEY",
"dotnet",
"github",
"GITHUB",
"meziantou",
"Meziantou",
"ncipollo",
"nupkg",
"nupkgs",
"pwsh"
],
"ignoreWords": [],
"import": []
"version": "0.2",
"ignorePaths": [],
"dictionaryDefinitions": [],
"dictionaries": [],
"words": [
"APIKEY",
"dotnet",
"github",
"GITHUB",
"meziantou",
"Meziantou",
"ncipollo",
"nupkg",
"nupkgs",
"pwsh"
],
"ignoreWords": [],
"import": []
}

0 comments on commit 6796913

Please sign in to comment.