Skip to content

Commit f3cd714

Browse files
committed
Update
1 parent 262383e commit f3cd714

4 files changed

Lines changed: 41 additions & 17 deletions

File tree

template/src/.editorconfig

Lines changed: 35 additions & 12 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

@@ -883,7 +892,7 @@ dotnet_diagnostic.CRR0040.severity = suggestion
883892
##########################################
884893

885894
#### make all warning ####
886-
# https://github.com/SonarSource/sonarlint-visualstudio/blob/master/src/Roslyn.Suppressions/Roslyn.Suppressions/SupportedSuppressionBuilder.g.cs
895+
# https://github.com/SonarSource/sonarlint-visualstudio/blob/ee558fccfe1e4df50d9ac33d8e5df9d698648ccd/src/Roslyn.Suppressions/Roslyn.Suppressions/SupportedSuppressionBuilder.g.cs
887896

888897
dotnet_diagnostic.S100.severity = warning
889898
dotnet_diagnostic.S1006.severity = warning
@@ -956,7 +965,8 @@ dotnet_diagnostic.S1449.severity = warning
956965
dotnet_diagnostic.S1450.severity = warning
957966
dotnet_diagnostic.S1451.severity = warning
958967
dotnet_diagnostic.S1479.severity = warning
959-
dotnet_diagnostic.S1481.severity = warning
968+
# Unused local variables should be removed
969+
dotnet_diagnostic.S1481.severity = warning # don't change, no repetition with IDE0059
960970
dotnet_diagnostic.S1541.severity = warning
961971
dotnet_diagnostic.S1542.severity = warning
962972
dotnet_diagnostic.S1607.severity = warning
@@ -1058,7 +1068,7 @@ dotnet_diagnostic.S2374.severity = warning
10581068
dotnet_diagnostic.S2375.severity = warning
10591069
dotnet_diagnostic.S2376.severity = warning
10601070
dotnet_diagnostic.S2386.severity = warning
1061-
dotnet_diagnostic.S2387.severity = warning
1071+
# dotnet_diagnostic.S2387.severity = warning # This rule is deprecated
10621072
dotnet_diagnostic.S2429.severity = warning
10631073
dotnet_diagnostic.S2436.severity = warning
10641074
dotnet_diagnostic.S2437.severity = warning
@@ -1194,7 +1204,7 @@ dotnet_diagnostic.S3877.severity = warning
11941204
dotnet_diagnostic.S3878.severity = warning
11951205
dotnet_diagnostic.S3880.severity = warning
11961206
dotnet_diagnostic.S3881.severity = warning
1197-
dotnet_diagnostic.S3884.severity = warning
1207+
# dotnet_diagnostic.S3884.severity = warning # This rule is deprecated
11981208
dotnet_diagnostic.S3885.severity = warning
11991209
dotnet_diagnostic.S3887.severity = warning
12001210
dotnet_diagnostic.S3889.severity = warning
@@ -1273,8 +1283,8 @@ dotnet_diagnostic.S4200.severity = warning
12731283
dotnet_diagnostic.S4201.severity = warning
12741284
dotnet_diagnostic.S4210.severity = warning
12751285
dotnet_diagnostic.S4211.severity = warning
1276-
dotnet_diagnostic.S4212.severity = warning
1277-
dotnet_diagnostic.S4214.severity = warning
1286+
# dotnet_diagnostic.S4212.severity = warning # This rule is deprecated
1287+
# dotnet_diagnostic.S4214.severity = warning # This rule is deprecated
12781288
dotnet_diagnostic.S4220.severity = warning
12791289
dotnet_diagnostic.S4225.severity = warning
12801290
dotnet_diagnostic.S4226.severity = warning
@@ -1301,7 +1311,7 @@ dotnet_diagnostic.S4586.severity = warning
13011311
dotnet_diagnostic.S4635.severity = warning
13021312
dotnet_diagnostic.S4663.severity = warning
13031313
dotnet_diagnostic.S4790.severity = warning
1304-
dotnet_diagnostic.S4792.severity = warning
1314+
# dotnet_diagnostic.S4792.severity = warning # This rule is deprecated
13051315
dotnet_diagnostic.S4830.severity = warning
13061316
dotnet_diagnostic.S5034.severity = warning
13071317
dotnet_diagnostic.S5042.severity = warning
@@ -1369,7 +1379,7 @@ dotnet_diagnostic.S6797.severity = warning
13691379
dotnet_diagnostic.S6798.severity = warning
13701380
dotnet_diagnostic.S6800.severity = warning
13711381
dotnet_diagnostic.S6802.severity = warning
1372-
dotnet_diagnostic.S6803.severity = warning
1382+
# dotnet_diagnostic.S6803.severity = warning # This rule is deprecated
13731383
dotnet_diagnostic.S6930.severity = warning
13741384
dotnet_diagnostic.S6931.severity = warning
13751385
dotnet_diagnostic.S6932.severity = warning
@@ -1408,6 +1418,9 @@ dotnet_diagnostic.S2148.severity = suggestion
14081418
# "Exception" should not be caught
14091419
dotnet_diagnostic.S2221.severity = suggestion
14101420

1421+
# The simplest possible condition syntax should be used
1422+
dotnet_diagnostic.S3240.severity = suggestion
1423+
14111424
# Method parameters should be declared with base types
14121425
dotnet_diagnostic.S3242.severity = suggestion
14131426

@@ -1619,6 +1632,20 @@ dotnet_diagnostic.MsgPack016.severity = error
16191632
dotnet_diagnostic.MsgPack017.severity = error
16201633
dotnet_diagnostic.MsgPack018.severity = error
16211634

1635+
##########################################
1636+
# ORLEANS
1637+
##########################################
1638+
1639+
# ORLEANS0009: Grain interfaces methods must return a compatible type
1640+
dotnet_diagnostic.ORLEANS0009.severity = error
1641+
1642+
##########################################
1643+
# source-generator syslib-diagnostics
1644+
# https://learn.microsoft.com/zh-cn/dotnet/fundamentals/syslib-diagnostics/source-generator-overview
1645+
##########################################
1646+
1647+
dotnet_diagnostic.SYSLIB1038.severity = error
1648+
16221649
##########################################
16231650
# ReSharper properties
16241651
##########################################
@@ -1649,10 +1676,6 @@ dotnet_diagnostic.CA1823.severity = none
16491676
# CA2007: Do not directly await a Task
16501677
dotnet_diagnostic.CA2007.severity = none
16511678

1652-
# duplicate with IDE0059
1653-
# Unused local variables should be removed
1654-
dotnet_diagnostic.S1481.severity = none
1655-
16561679
# Operator overloads have named alternates
16571680
dotnet_diagnostic.CA2225.severity = none
16581681

template/src/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<UseArtifactsOutput>true</UseArtifactsOutput>
55
<AnalysisMode>All</AnalysisMode>
6+
<GenerateDocumentationFile>True</GenerateDocumentationFile>
67
</PropertyGroup>
78

89
</Project>

template/src/Directory.Build.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<Compile Remove="_Generated\**\*.g.cs" />
12-
<None Include="_Generated\**\*.g.cs" />
11+
<Compile Remove="_Generated\**\*.cs" />
12+
<None Include="_Generated\**\*.cs" />
1313
</ItemGroup>
1414

1515
<Target Name="CustomClean" AfterTargets="Clean">

template/src/nuget.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
44
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
5-
<add key="azure.cn" value="https://nuget.cdn.azure.cn/v3/index.json" />
5+
<!-- <add key="azure.cn" value="https://nuget.cdn.azure.cn/v3/index.json" /> -->
66
</packageSources>
77
<packageSourceMapping>
8-
<packageSource key="azure.cn">
8+
<packageSource key="nuget.org">
99
<package pattern="*" />
1010
</packageSource>
1111
</packageSourceMapping>

0 commit comments

Comments
 (0)