Skip to content
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
52 changes: 14 additions & 38 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,12 @@ dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
dotnet_style_prefer_simplified_interpolation = true:suggestion

# Dispose rules (CA2000 and CA2213) ported to IDE analyzers. We already execute the CA rules on the repo, so disable the IDE ones.
dotnet_diagnostic.IDE0005.severity = none
dotnet_diagnostic.IDE0067.severity = none
dotnet_diagnostic.IDE0068.severity = none
dotnet_diagnostic.IDE0069.severity = none
dotnet_diagnostic.CA1016.severity = none
#### C# Coding Conventions ####

# Prefer "var" everywhere
csharp_style_var_for_built_in_types = true:silent
csharp_style_var_when_type_is_apparent = true:silent
csharp_style_var_elsewhere = true:silent
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion

# Prefer method-like constructs to have a block body, except for lambdas
csharp_style_expression_bodied_methods = true:warning
Expand Down Expand Up @@ -152,38 +145,15 @@ csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false

resharper_csharp_use_roslyn_logic_for_evident_types = true

# Alignment
align_multiline_parameter = true
resharper_csharp_align_multiline_parameter = true

# Qualify fields with "this."
csharp_instance_members_qualify_members = field

# IDE0011: Add braces
dotnet_diagnostic.IDE0011.severity = none

# IDE0090: Use 'new(...)'
dotnet_diagnostic.IDE0090.severity = warning

# IDE0041: Use 'is null' check
dotnet_diagnostic.IDE0041.severity = warning

# CA1825: Avoid zero-length array allocations
dotnet_diagnostic.CA1825.severity = warning

# CA1822: Mark members as static
dotnet_diagnostic.CA1822.severity = warning

# CA2208: Instantiate argument exceptions correctly
dotnet_diagnostic.CA2208.severity = warning

# CA1810: Initialize reference type static fields inline
dotnet_diagnostic.CA1810.severity = warning

# CA1816: Dispose methods should call SuppressFinalize
dotnet_diagnostic.CA1816.severity = warning
resharper_csharp_instance_members_qualify_members = field

# IDE0005: Using directive is unnecessary.
dotnet_diagnostic.IDE0005.severity = warning
Expand All @@ -194,4 +164,10 @@ dotnet_diagnostic.RCS1037.severity = error
# RCS1036: Remove redundant empty line.
dotnet_diagnostic.RCS1036.severity = error

[resharper_]xml_space_before_self_closing = true
xml_space_before_self_closing = true

resharper_arrange_object_creation_when_type_not_evident_highlighting = none

resharper_unused_auto_property_accessor_global_highlighting = none

resharper_unused_method_return_value_global_highlighting = none
35 changes: 35 additions & 0 deletions .github/workflows/qodana_code_quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Qodana
on:
workflow_dispatch:
push:
branches:
- main
- 'fix/*'
- 'feature/*'
jobs:
qodana:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
checks: write
steps:
-
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
-
name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
-
name: 'Qodana Scan'
uses: jetbrains/[email protected]
with:
args: --baseline,qodana.sarif.json
cache-default-branch-only: true
pr-mode: true
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ TestResults
ClientBin
stylecop.*
~$*
*~
*.dbmdl
site/
Generated_Code #added for RIA/Silverlight projects
Expand Down
2 changes: 2 additions & 0 deletions build/CI.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<File Path="../.gitignore" />
<File Path="../.remarkrc.yaml" />
<File Path="../global.json" />
<File Path="../qodana.yaml" />
<File Path="../package.json" />
<File Path="../src/mark-shipped.ps1" />
<File Path="Directory.Build.props" />
Expand All @@ -44,6 +45,7 @@
<File Path="../.github/workflows/release.yml" />
<File Path="../.github/workflows/stale.yml" />
<File Path="../.github/workflows/winget.yml" />
<File Path="../.github/workflows/qodana_code_quality.yml" />
</Folder>
<Folder Name="/workflows/_/">
<File Path="../.github/workflows/_artifacts_linux.yml" />
Expand Down
Loading