Skip to content

Commit

Permalink
add roslynator
Browse files Browse the repository at this point in the history
  • Loading branch information
ar1a committed Oct 5, 2024
1 parent f6e7b6e commit 1d9b282
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,23 @@ root = true

[*.cs]
indent_size = 4
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
# dotnet_naming_style.camel_case_underscore_style.required_prefix = _
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case

# Prefer braces
csharp_prefer_braces = true:silent

# Prefer var
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion

# namespace file scope
csharp_style_namespace_declarations = file_scoped
7 changes: 6 additions & 1 deletion puzzle course.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
<RootNamespace>puzzlecourse</RootNamespace>
<CodeAnalysisRuleSet>roslynator.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Roslynator.Analyzers" Version="4.12.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>
</Project>
20 changes: 20 additions & 0 deletions roslynator.ruleset
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Rules for Project" ToolsVersion="15.0">
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp.Features" RuleNamespace="Microsoft.CodeAnalysis.CSharp.Features">
<Rule Id="IDE0060" Action="None" />
<Rule Id="IDE0005" Action="Info" />
<Rule Id="IDE0051" Action="None" />
<Rule Id="IDE0004" Action="Info" />
<Rule Id="RCS1129" Action="None" />
<Rule Id="RCS1074" Action="Info" />
</Rules>
<Rules AnalyzerId="Roslynator.CSharp.Analyzers" RuleNamespace="Roslynator.CSharp.Analyzers">
<Rule Id="RCS1090" Action="None" />
<Rule Id="RCS1079" Action="None" />
<Rule Id="RCS1171" Action="None" />
<Rule Id="RCS1036" Action="None" />
<Rule Id="RCS1037" Action="None" />
<Rule Id="RCS1124" Action="None" />
<Rule Id="RCS1096" Action="None" />
</Rules>
</RuleSet>

0 comments on commit 1d9b282

Please sign in to comment.