Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
b98cf32a
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b98cf32a
编写于
7月 30, 2019
作者:
J
jnm2
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed leading blank line in generated GlobalSuppressions.cs
上级
c32b2b21
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
60 addition
and
82 deletion
+60
-82
src/EditorFeatures/CSharpTest/Diagnostics/Suppression/SuppressionTest_FixAllTests.cs
...st/Diagnostics/Suppression/SuppressionTest_FixAllTests.cs
+10
-10
src/EditorFeatures/CSharpTest/Diagnostics/Suppression/SuppressionTests.cs
...es/CSharpTest/Diagnostics/Suppression/SuppressionTests.cs
+21
-40
src/EditorFeatures/VisualBasicTest/Diagnostics/Suppression/SuppressionTests.vb
...sualBasicTest/Diagnostics/Suppression/SuppressionTests.vb
+28
-30
src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.cs
...deFixes/Suppression/AbstractSuppressionCodeFixProvider.cs
+1
-2
未找到文件。
src/EditorFeatures/CSharpTest/Diagnostics/Suppression/SuppressionTest_FixAllTests.cs
浏览文件 @
b98cf32a
...
...
@@ -367,8 +367,8 @@ class Class2
</Project>
</Workspace>"
;
var
addedGlobalSuppressions
=
$@"
// This file is used by Code Analysis to maintain SuppressMessage
var
addedGlobalSuppressions
=
$@"
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -470,8 +470,8 @@ class Class2
</Project>
</Workspace>"
;
var
addedGlobalSuppressions
=
$@"
// This file is used by Code Analysis to maintain SuppressMessage
var
addedGlobalSuppressions
=
$@"
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -574,8 +574,8 @@ class Class2
</Project>
</Workspace>"
;
var
addedGlobalSuppressionsProject1
=
$@"
// This file is used by Code Analysis to maintain SuppressMessage
var
addedGlobalSuppressionsProject1
=
$@"
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -587,8 +587,8 @@ class Class2
"
.
Replace
(
"<"
,
"<"
).
Replace
(
">"
,
">"
);
var
addedGlobalSuppressionsProject2
=
$@"
// This file is used by Code Analysis to maintain SuppressMessage
var
addedGlobalSuppressionsProject2
=
$@"
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -697,8 +697,8 @@ class Class2
</Project>
</Workspace>"
;
var
addedGlobalSuppressions
=
$@"
// This file is used by Code Analysis to maintain SuppressMessage
var
addedGlobalSuppressions
=
$@"
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
src/EditorFeatures/CSharpTest/Diagnostics/Suppression/SuppressionTests.cs
浏览文件 @
b98cf32a
...
...
@@ -808,8 +808,8 @@ public void AnalyzeNode(SyntaxNodeAnalysisContext context)
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsSuppression
)]
public
async
Task
GeneratedCodeShouldNotHaveTrailingWhitespace
()
{
var
expected
=
$@"
// This file is used by Code Analysis to maintain SuppressMessage
var
expected
=
$@"
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -881,8 +881,7 @@ int Method()
int x = 0;
}
}"
,
$@"
// This file is used by Code Analysis to maintain SuppressMessage
$@"// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -924,8 +923,7 @@ int Method()
}
}
}"
,
$@"
// This file is used by Code Analysis to maintain SuppressMessage
$@"// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -973,8 +971,7 @@ int Method()
}
}
}"
,
$@"
// This file is used by Code Analysis to maintain SuppressMessage
$@"// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1025,8 +1022,7 @@ int Method()
}
}
}"
,
$@"
// This file is used by Code Analysis to maintain SuppressMessage
$@"// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1077,8 +1073,7 @@ class Class
}
}
}"
,
$@"
// This file is used by Code Analysis to maintain SuppressMessage
$@"// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1134,8 +1129,7 @@ int Method()
}
}
}"
,
$@"
// This file is used by Code Analysis to maintain SuppressMessage
$@"// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1194,8 +1188,7 @@ int Method()
}
}
}"
,
$@"
// This file is used by Code Analysis to maintain SuppressMessage
$@"// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1225,8 +1218,7 @@ class Class
}
}
}"
,
$@"
// This file is used by Code Analysis to maintain SuppressMessage
$@"// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1277,8 +1269,7 @@ class Class
}
}
}"
,
$@"
// This file is used by Code Analysis to maintain SuppressMessage
$@"// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1320,8 +1311,7 @@ class Class
{
[|int field = 0;|]
}"
,
$@"
// This file is used by Code Analysis to maintain SuppressMessage
$@"// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1362,8 +1352,7 @@ enum E
Field2
|]
}"
,
$@"
// This file is used by Code Analysis to maintain SuppressMessage
$@"// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1399,8 +1388,7 @@ class Class
{
int [|field = 0|], field2 = 1;
}"
,
$@"
// This file is used by Code Analysis to maintain SuppressMessage
$@"// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1447,8 +1435,7 @@ class Class
remove { }
}|]
}"
,
$@"
// This file is used by Code Analysis to maintain SuppressMessage
$@"// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1497,8 +1484,7 @@ class Class { }
[|class Class2|] { }
]]>
</Document>
<Document FilePath=""GlobalSuppressions.cs""><![CDATA[
// This file is used by Code Analysis to maintain SuppressMessage
<Document FilePath=""GlobalSuppressions.cs""><![CDATA[// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1509,8 +1495,7 @@ class Class { }
</Project>
</Workspace>"
;
var
expectedText
=
$@"
// This file is used by Code Analysis to maintain SuppressMessage
$@"// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1546,8 +1531,7 @@ class Class { }
</Project>
</Workspace>"
;
var
expectedText
=
$@"
// This file is used by Code Analysis to maintain SuppressMessage
$@"// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1579,8 +1563,7 @@ class Class { }
class Class { }
]]>
</Document>
<Document FilePath=""GlobalSuppressions2.cs""><![CDATA[
// This file is used by Code Analysis to maintain SuppressMessage
<Document FilePath=""GlobalSuppressions2.cs""><![CDATA[// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1591,8 +1574,7 @@ class Class { }
</Project>
</Workspace>"
;
var
expectedText
=
$@"
// This file is used by Code Analysis to maintain SuppressMessage
$@"// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1997,8 +1979,7 @@ int Method()
int x = 0;
}
}"
,
$@"
// This file is used by Code Analysis to maintain SuppressMessage
$@"// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
...
...
src/EditorFeatures/VisualBasicTest/Diagnostics/Suppression/SuppressionTests.vb
浏览文件 @
b98cf32a
...
...
@@ -980,8 +980,8 @@ Imports System
Dim
x
End
Sub
End
Class
]]
>
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
' attributes that are applied to this project.
' Project-level suppressions either have no target or are given
' a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1018,8 +1018,8 @@ Imports System
End
Sub
End
Class
End
Namespace
]]
>
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
' attributes that are applied to this project.
' Project-level suppressions either have no target or are given
' a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1060,8 +1060,8 @@ Namespace N1
End
Class
End
Namespace
End
Namespace
]]
>
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
' attributes that are applied to this project.
' Project-level suppressions either have no target or are given
' a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1104,8 +1104,8 @@ Namespace N
End
Class
End
Class
End
Namespace
]]
>
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
' attributes that are applied to this project.
' Project-level suppressions either have no target or are given
' a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1148,8 +1148,8 @@ Namespace N
End
Class
End
Class
End
Namespace
]]
>
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
' attributes that are applied to this project.
' Project-level suppressions either have no target or are given
' a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1196,8 +1196,8 @@ Namespace N
End
Class
End
Class
End
Namespace
]]
>
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
' attributes that are applied to this project.
' Project-level suppressions either have no target or are given
' a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1248,8 +1248,8 @@ Namespace N
End
Class
End
Class
End
Namespace
]]
>
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
' attributes that are applied to this project.
' Project-level suppressions either have no target or are given
' a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1298,8 +1298,8 @@ Namespace N
End
Class
End
Class
End
Namespace
]]
>
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
' attributes that are applied to this project.
' Project-level suppressions either have no target or are given
' a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1338,8 +1338,8 @@ Imports System
Class
C
[|
Private
ReadOnly
F
As
Integer
|]
End
Class
]]
>
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
' attributes that are applied to this project.
' Project-level suppressions either have no target or are given
' a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1394,8 +1394,8 @@ Class C
End
RemoveHandler
End
Event
End
Class
]]
>
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
' attributes that are applied to this project.
' Project-level suppressions either have no target or are given
' a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1456,8 +1456,7 @@ End Class
[|
Class
Class2
|]
End
Class
]]
>
</
Document
>
<
Document
FilePath
=
"GlobalSuppressions.vb"
><
!
[
CDATA
[
' This file is used by Code Analysis to maintain SuppressMessage
<
Document
FilePath
=
"GlobalSuppressions.vb"
><
!
[
CDATA
[
' This file is used by Code Analysis to maintain SuppressMessage
' attributes that are applied to this project.
' Project-level suppressions either have no target or are given
' a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1468,8 +1467,8 @@ End Class]]>
</
Project
>
</
Workspace
>
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
' attributes that are applied to this project.
' Project-level suppressions either have no target or are given
' a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1505,8 +1504,8 @@ End Class
</
Project
>
</
Workspace
>
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
' attributes that are applied to this project.
' Project-level suppressions either have no target or are given
' a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1538,8 +1537,7 @@ Class Class3
End
Class
]]
>
</
Document
>
<
Document
FilePath
=
"GlobalSuppressions2.vb"
><
!
[
CDATA
[
' This file is used by Code Analysis to maintain SuppressMessage
<
Document
FilePath
=
"GlobalSuppressions2.vb"
><
!
[
CDATA
[
' This file is used by Code Analysis to maintain SuppressMessage
' attributes that are applied to this project.
' Project-level suppressions either have no target or are given
' a specific target and scoped to a namespace, type, member, etc.
...
...
@@ -1550,8 +1548,8 @@ End Class
</
Project
>
</
Workspace
>
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
Dim
expected
=
$
"
' This file is used by Code Analysis to maintain SuppressMessage
' attributes that are applied to this project.
' Project-level suppressions either have no target or are given
' a specific target and scoped to a namespace, type, member, etc.
...
...
src/Features/Core/Portable/CodeFixes/Suppression/AbstractSuppressionCodeFixProvider.cs
浏览文件 @
b98cf32a
...
...
@@ -20,8 +20,7 @@ internal abstract partial class AbstractSuppressionCodeFixProvider : IConfigurat
public
const
string
SuppressMessageAttributeName
=
"System.Diagnostics.CodeAnalysis.SuppressMessage"
;
private
const
string
s_globalSuppressionsFileName
=
"GlobalSuppressions"
;
private
const
string
s_suppressionsFileCommentTemplate
=
@"
{0} This file is used by Code Analysis to maintain SuppressMessage
@"{0} This file is used by Code Analysis to maintain SuppressMessage
{0} attributes that are applied to this project.
{0} Project-level suppressions either have no target or are given
{0} a specific target and scoped to a namespace, type, member, etc.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录