Skip to content

Commit 485eeeb

Browse files
committed
Update CodeMetrics
1 parent d7639d8 commit 485eeeb

File tree

5 files changed

+240
-428
lines changed

5 files changed

+240
-428
lines changed

src/.editorconfig

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -742,12 +742,21 @@ dotnet_diagnostic.CA1848.severity = warning
742742
# CS0162: 检测到无法访问的代码
743743
dotnet_diagnostic.CS0162.severity = error
744744

745+
# CS1573: Parameter has no matching param tag in the XML comment (but other parameters do)
746+
dotnet_diagnostic.CS1573.severity = none
747+
748+
# CS1591: Missing XML comment for publicly visible type or member
749+
dotnet_diagnostic.CS1591.severity = none
750+
745751
# CS1998: 异步方法缺少 "await" 运算符,将以同步方式运行
746752
dotnet_diagnostic.CS1998.severity = error
747753

748754
# CS4014: 由于此调用不会等待,因此在调用完成前将继续执行当前方法
749755
dotnet_diagnostic.CS4014.severity = error
750756

757+
# CA1008:枚举应具有零值
758+
dotnet_diagnostic.CA1008.severity = suggestion
759+
751760
# 在适用处使用属性
752761
dotnet_diagnostic.CA1024.severity = suggestion
753762

@@ -909,11 +918,11 @@ dotnet_diagnostic.CRR0040.severity = suggestion
909918

910919
##########################################
911920
# SonarLint
912-
# https://rules.sonarsource.com/csharp/RSPEC-112/
921+
# https://next.sonarqube.com/sonarqube/coding_rules?languages=cs&q=S138&open=csharpsquid%3AS138
913922
##########################################
914923

915924
#### make all warning ####
916-
# https://github.com/SonarSource/sonarlint-visualstudio/blob/master/src/Roslyn.Suppressions/Roslyn.Suppressions/SupportedSuppressionBuilder.g.cs
925+
# https://github.com/SonarSource/sonarlint-visualstudio/blob/ee558fccfe1e4df50d9ac33d8e5df9d698648ccd/src/Roslyn.Suppressions/Roslyn.Suppressions/SupportedSuppressionBuilder.g.cs
917926

918927
dotnet_diagnostic.S100.severity = warning
919928
dotnet_diagnostic.S1006.severity = warning
@@ -986,7 +995,8 @@ dotnet_diagnostic.S1449.severity = warning
986995
dotnet_diagnostic.S1450.severity = warning
987996
dotnet_diagnostic.S1451.severity = warning
988997
dotnet_diagnostic.S1479.severity = warning
989-
dotnet_diagnostic.S1481.severity = warning
998+
# Unused local variables should be removed
999+
dotnet_diagnostic.S1481.severity = warning # don't change, no repetition with IDE0059
9901000
dotnet_diagnostic.S1541.severity = warning
9911001
dotnet_diagnostic.S1542.severity = warning
9921002
dotnet_diagnostic.S1607.severity = warning
@@ -1088,7 +1098,7 @@ dotnet_diagnostic.S2374.severity = warning
10881098
dotnet_diagnostic.S2375.severity = warning
10891099
dotnet_diagnostic.S2376.severity = warning
10901100
dotnet_diagnostic.S2386.severity = warning
1091-
dotnet_diagnostic.S2387.severity = warning
1101+
# dotnet_diagnostic.S2387.severity = warning # This rule is deprecated
10921102
dotnet_diagnostic.S2429.severity = warning
10931103
dotnet_diagnostic.S2436.severity = warning
10941104
dotnet_diagnostic.S2437.severity = warning
@@ -1224,7 +1234,7 @@ dotnet_diagnostic.S3877.severity = warning
12241234
dotnet_diagnostic.S3878.severity = warning
12251235
dotnet_diagnostic.S3880.severity = warning
12261236
dotnet_diagnostic.S3881.severity = warning
1227-
dotnet_diagnostic.S3884.severity = warning
1237+
# dotnet_diagnostic.S3884.severity = warning # This rule is deprecated
12281238
dotnet_diagnostic.S3885.severity = warning
12291239
dotnet_diagnostic.S3887.severity = warning
12301240
dotnet_diagnostic.S3889.severity = warning
@@ -1303,8 +1313,8 @@ dotnet_diagnostic.S4200.severity = warning
13031313
dotnet_diagnostic.S4201.severity = warning
13041314
dotnet_diagnostic.S4210.severity = warning
13051315
dotnet_diagnostic.S4211.severity = warning
1306-
dotnet_diagnostic.S4212.severity = warning
1307-
dotnet_diagnostic.S4214.severity = warning
1316+
# dotnet_diagnostic.S4212.severity = warning # This rule is deprecated
1317+
# dotnet_diagnostic.S4214.severity = warning # This rule is deprecated
13081318
dotnet_diagnostic.S4220.severity = warning
13091319
dotnet_diagnostic.S4225.severity = warning
13101320
dotnet_diagnostic.S4226.severity = warning
@@ -1331,7 +1341,7 @@ dotnet_diagnostic.S4586.severity = warning
13311341
dotnet_diagnostic.S4635.severity = warning
13321342
dotnet_diagnostic.S4663.severity = warning
13331343
dotnet_diagnostic.S4790.severity = warning
1334-
dotnet_diagnostic.S4792.severity = warning
1344+
# dotnet_diagnostic.S4792.severity = warning # This rule is deprecated
13351345
dotnet_diagnostic.S4830.severity = warning
13361346
dotnet_diagnostic.S5034.severity = warning
13371347
dotnet_diagnostic.S5042.severity = warning
@@ -1399,7 +1409,7 @@ dotnet_diagnostic.S6797.severity = warning
13991409
dotnet_diagnostic.S6798.severity = warning
14001410
dotnet_diagnostic.S6800.severity = warning
14011411
dotnet_diagnostic.S6802.severity = warning
1402-
dotnet_diagnostic.S6803.severity = warning
1412+
# dotnet_diagnostic.S6803.severity = warning # This rule is deprecated
14031413
dotnet_diagnostic.S6930.severity = warning
14041414
dotnet_diagnostic.S6931.severity = warning
14051415
dotnet_diagnostic.S6932.severity = warning
@@ -1438,6 +1448,9 @@ dotnet_diagnostic.S2148.severity = suggestion
14381448
# "Exception" should not be caught
14391449
dotnet_diagnostic.S2221.severity = suggestion
14401450

1451+
# The simplest possible condition syntax should be used
1452+
dotnet_diagnostic.S3240.severity = suggestion
1453+
14411454
# Method parameters should be declared with base types
14421455
dotnet_diagnostic.S3242.severity = suggestion
14431456

@@ -1653,6 +1666,21 @@ dotnet_diagnostic.MsgPack016.severity = error
16531666
dotnet_diagnostic.MsgPack017.severity = error
16541667
dotnet_diagnostic.MsgPack018.severity = error
16551668

1669+
##########################################
1670+
# ORLEANS
1671+
##########################################
1672+
1673+
# ORLEANS0009: Grain interfaces methods must return a compatible type
1674+
dotnet_diagnostic.ORLEANS0009.severity = error
1675+
1676+
##########################################
1677+
# source-generator syslib-diagnostics
1678+
# https://learn.microsoft.com/zh-cn/dotnet/fundamentals/syslib-diagnostics/source-generator-overview
1679+
##########################################
1680+
1681+
# System.Text.Json 源生成器遇到使用 [JsonInclude] 注释的属性,该属性具有不可访问的访问器
1682+
dotnet_diagnostic.SYSLIB1038.severity = error
1683+
16561684
##########################################
16571685
# Mapperly
16581686
# https://github.com/riok/mapperly/blob/main/src/Riok.Mapperly/Diagnostics/DiagnosticDescriptors.cs
@@ -1774,10 +1802,6 @@ dotnet_diagnostic.CA1823.severity = none
17741802
# CA2007: Do not directly await a Task
17751803
dotnet_diagnostic.CA2007.severity = none
17761804

1777-
# duplicate with IDE0059
1778-
# Unused local variables should be removed
1779-
dotnet_diagnostic.S1481.severity = none
1780-
17811805
# Operator overloads have named alternates
17821806
dotnet_diagnostic.CA2225.severity = none
17831807

0 commit comments

Comments
 (0)