Skip to content

Commit 70c0d9a

Browse files
authored
Merge pull request #4514 from GitTools/feature/qodana-analysis
Introduce Qodana analysis
2 parents 4f2ca1e + 0ec9f61 commit 70c0d9a

File tree

236 files changed

+163512
-1833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+163512
-1833
lines changed

.editorconfig

+14-38
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,12 @@ dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
5858
dotnet_style_prefer_inferred_tuple_names = true:suggestion
5959
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
6060
dotnet_style_prefer_simplified_interpolation = true:suggestion
61-
62-
# Dispose rules (CA2000 and CA2213) ported to IDE analyzers. We already execute the CA rules on the repo, so disable the IDE ones.
63-
dotnet_diagnostic.IDE0005.severity = none
64-
dotnet_diagnostic.IDE0067.severity = none
65-
dotnet_diagnostic.IDE0068.severity = none
66-
dotnet_diagnostic.IDE0069.severity = none
67-
dotnet_diagnostic.CA1016.severity = none
6861
#### C# Coding Conventions ####
6962

7063
# Prefer "var" everywhere
71-
csharp_style_var_for_built_in_types = true:silent
72-
csharp_style_var_when_type_is_apparent = true:silent
73-
csharp_style_var_elsewhere = true:silent
64+
csharp_style_var_for_built_in_types = true:suggestion
65+
csharp_style_var_when_type_is_apparent = true:suggestion
66+
csharp_style_var_elsewhere = true:suggestion
7467

7568
# Prefer method-like constructs to have a block body, except for lambdas
7669
csharp_style_expression_bodied_methods = true:warning
@@ -152,38 +145,15 @@ csharp_space_between_method_call_parameter_list_parentheses = false
152145
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
153146
csharp_space_between_method_declaration_name_and_open_parenthesis = false
154147
csharp_space_between_method_declaration_parameter_list_parentheses = false
155-
csharp_space_between_parentheses = false
156148
csharp_space_between_square_brackets = false
157149

150+
resharper_csharp_use_roslyn_logic_for_evident_types = true
151+
158152
# Alignment
159-
align_multiline_parameter = true
153+
resharper_csharp_align_multiline_parameter = true
160154

161155
# Qualify fields with "this."
162-
csharp_instance_members_qualify_members = field
163-
164-
# IDE0011: Add braces
165-
dotnet_diagnostic.IDE0011.severity = none
166-
167-
# IDE0090: Use 'new(...)'
168-
dotnet_diagnostic.IDE0090.severity = warning
169-
170-
# IDE0041: Use 'is null' check
171-
dotnet_diagnostic.IDE0041.severity = warning
172-
173-
# CA1825: Avoid zero-length array allocations
174-
dotnet_diagnostic.CA1825.severity = warning
175-
176-
# CA1822: Mark members as static
177-
dotnet_diagnostic.CA1822.severity = warning
178-
179-
# CA2208: Instantiate argument exceptions correctly
180-
dotnet_diagnostic.CA2208.severity = warning
181-
182-
# CA1810: Initialize reference type static fields inline
183-
dotnet_diagnostic.CA1810.severity = warning
184-
185-
# CA1816: Dispose methods should call SuppressFinalize
186-
dotnet_diagnostic.CA1816.severity = warning
156+
resharper_csharp_instance_members_qualify_members = field
187157

188158
# IDE0005: Using directive is unnecessary.
189159
dotnet_diagnostic.IDE0005.severity = warning
@@ -194,4 +164,10 @@ dotnet_diagnostic.RCS1037.severity = error
194164
# RCS1036: Remove redundant empty line.
195165
dotnet_diagnostic.RCS1036.severity = error
196166

197-
[resharper_]xml_space_before_self_closing = true
167+
xml_space_before_self_closing = true
168+
169+
resharper_arrange_object_creation_when_type_not_evident_highlighting = none
170+
171+
resharper_unused_auto_property_accessor_global_highlighting = none
172+
173+
resharper_unused_method_return_value_global_highlighting = none
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Qodana
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
- 'fix/*'
8+
- 'feature/*'
9+
jobs:
10+
qodana:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
checks: write
16+
steps:
17+
-
18+
uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.event.pull_request.head.sha }}
21+
fetch-depth: 0
22+
-
23+
name: Setup .NET SDK
24+
uses: actions/setup-dotnet@v4
25+
with:
26+
global-json-file: global.json
27+
-
28+
name: 'Qodana Scan'
29+
uses: jetbrains/[email protected]
30+
with:
31+
args: --baseline,qodana.sarif.json
32+
cache-default-branch-only: true
33+
pr-mode: true
34+
env:
35+
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ TestResults
6161
ClientBin
6262
stylecop.*
6363
~$*
64-
*~
6564
*.dbmdl
6665
site/
6766
Generated_Code #added for RIA/Silverlight projects

build/CI.slnx

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<File Path="../.gitignore" />
2929
<File Path="../.remarkrc.yaml" />
3030
<File Path="../global.json" />
31+
<File Path="../qodana.yaml" />
3132
<File Path="../package.json" />
3233
<File Path="../src/mark-shipped.ps1" />
3334
<File Path="Directory.Build.props" />
@@ -44,6 +45,7 @@
4445
<File Path="../.github/workflows/release.yml" />
4546
<File Path="../.github/workflows/stale.yml" />
4647
<File Path="../.github/workflows/winget.yml" />
48+
<File Path="../.github/workflows/qodana_code_quality.yml" />
4749
</Folder>
4850
<Folder Name="/workflows/_/">
4951
<File Path="../.github/workflows/_artifacts_linux.yml" />

0 commit comments

Comments
 (0)