Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
ffa46d06
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,发现更多精彩内容 >>
提交
ffa46d06
编写于
3月 20, 2020
作者:
M
Manish Vasani
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Port UseExplicitTupleName analyzer/fixer/tests to shared layer
上级
09d1cd70
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
19 addition
and
6 deletion
+19
-6
src/Analyzers/CSharp/Tests/CSharpAnalyzers.UnitTests.projitems
...nalyzers/CSharp/Tests/CSharpAnalyzers.UnitTests.projitems
+1
-0
src/Analyzers/CSharp/Tests/UseExplicitTupleName/UseExplicitTupleNameTests.cs
...p/Tests/UseExplicitTupleName/UseExplicitTupleNameTests.cs
+6
-1
src/Analyzers/Core/Analyzers/Analyzers.projitems
src/Analyzers/Core/Analyzers/Analyzers.projitems
+1
-0
src/Analyzers/Core/Analyzers/UseExplicitTupleName/UseExplicitTupleNameDiagnosticAnalyzer.cs
...plicitTupleName/UseExplicitTupleNameDiagnosticAnalyzer.cs
+6
-2
src/Analyzers/Core/CodeFixes/CodeFixes.projitems
src/Analyzers/Core/CodeFixes/CodeFixes.projitems
+1
-0
src/Analyzers/Core/CodeFixes/UseExplicitTupleName/UseExplicitTupleNameCodeFixProvider.cs
...eExplicitTupleName/UseExplicitTupleNameCodeFixProvider.cs
+3
-3
src/Analyzers/VisualBasic/Tests/UseExplicitTupleName/UseExplicitTupleNameTests.vb
...c/Tests/UseExplicitTupleName/UseExplicitTupleNameTests.vb
+0
-0
src/Analyzers/VisualBasic/Tests/VisualBasicAnalyzers.UnitTests.projitems
...isualBasic/Tests/VisualBasicAnalyzers.UnitTests.projitems
+1
-0
未找到文件。
src/Analyzers/CSharp/Tests/CSharpAnalyzers.UnitTests.projitems
浏览文件 @
ffa46d06
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
<Compile
Include=
"$(MSBuildThisFileDirectory)OrderModifiers\OrderModifiersTests.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)OrderModifiers\OrderModifiersTests.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCoalesceExpression\UseCoalesceExpressionForNullableTests.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCoalesceExpression\UseCoalesceExpressionForNullableTests.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCoalesceExpression\UseCoalesceExpressionTests.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCoalesceExpression\UseCoalesceExpressionTests.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseExplicitTupleName\UseExplicitTupleNameTests.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseExpressionBody\UseExpressionBodyForAccessorsAnalyzerTests.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseExpressionBody\UseExpressionBodyForAccessorsAnalyzerTests.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseExpressionBody\UseExpressionBodyForConstructorsAnalyzerTests.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseExpressionBody\UseExpressionBodyForConstructorsAnalyzerTests.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseExpressionBody\UseExpressionBodyForConversionOperatorsAnalyzerTests.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseExpressionBody\UseExpressionBodyForConversionOperatorsAnalyzerTests.cs"
/>
...
...
src/
EditorFeatures/CSharpTest
/UseExplicitTupleName/UseExplicitTupleNameTests.cs
→
src/
Analyzers/CSharp/Tests
/UseExplicitTupleName/UseExplicitTupleNameTests.cs
浏览文件 @
ffa46d06
...
@@ -4,13 +4,18 @@
...
@@ -4,13 +4,18 @@
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
Microsoft.CodeAnalysis.CodeFixes
;
using
Microsoft.CodeAnalysis.CodeFixes
;
using
Microsoft.CodeAnalysis.CodeStyle
;
using
Microsoft.CodeAnalysis.Diagnostics
;
using
Microsoft.CodeAnalysis.Diagnostics
;
using
Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Diagnostics
;
using
Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Diagnostics
;
using
Microsoft.CodeAnalysis.Test.Utilities
;
using
Microsoft.CodeAnalysis.Test.Utilities
;
using
Microsoft.CodeAnalysis.UseExplicitTupleName
;
using
Microsoft.CodeAnalysis.UseExplicitTupleName
;
using
Xunit
;
using
Xunit
;
#if CODE_STYLE
using
Microsoft.CodeAnalysis.Internal.Options
;
#else
using
Microsoft.CodeAnalysis.CodeStyle
;
#endif
namespace
Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.UseExplicitTupleName
namespace
Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.UseExplicitTupleName
{
{
public
class
UseExplicitTupleNameTests
:
AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest
public
class
UseExplicitTupleNameTests
:
AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest
...
...
src/Analyzers/Core/Analyzers/Analyzers.projitems
浏览文件 @
ffa46d06
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCollectionInitializer\AbstractObjectCreationExpressionAnalyzer.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCollectionInitializer\AbstractObjectCreationExpressionAnalyzer.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCollectionInitializer\ObjectCreationExpressionAnalyzer.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCollectionInitializer\ObjectCreationExpressionAnalyzer.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseObjectInitializer\ObjectCreationExpressionAnalyzer.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseObjectInitializer\ObjectCreationExpressionAnalyzer.cs"
/>
...
...
src/
Features/Core/Portable
/UseExplicitTupleName/UseExplicitTupleNameDiagnosticAnalyzer.cs
→
src/
Analyzers/Core/Analyzers
/UseExplicitTupleName/UseExplicitTupleNameDiagnosticAnalyzer.cs
浏览文件 @
ffa46d06
...
@@ -9,6 +9,10 @@
...
@@ -9,6 +9,10 @@
using
Microsoft.CodeAnalysis.Diagnostics
;
using
Microsoft.CodeAnalysis.Diagnostics
;
using
Microsoft.CodeAnalysis.Operations
;
using
Microsoft.CodeAnalysis.Operations
;
#if CODE_STYLE
using
Microsoft.CodeAnalysis.Internal.Options
;
#endif
namespace
Microsoft.CodeAnalysis.UseExplicitTupleName
namespace
Microsoft.CodeAnalysis.UseExplicitTupleName
{
{
[
DiagnosticAnalyzer
(
LanguageNames
.
CSharp
,
LanguageNames
.
VisualBasic
)]
[
DiagnosticAnalyzer
(
LanguageNames
.
CSharp
,
LanguageNames
.
VisualBasic
)]
...
@@ -19,8 +23,8 @@ internal class UseExplicitTupleNameDiagnosticAnalyzer : AbstractBuiltInCodeStyle
...
@@ -19,8 +23,8 @@ internal class UseExplicitTupleNameDiagnosticAnalyzer : AbstractBuiltInCodeStyle
public
UseExplicitTupleNameDiagnosticAnalyzer
()
public
UseExplicitTupleNameDiagnosticAnalyzer
()
:
base
(
IDEDiagnosticIds
.
UseExplicitTupleNameDiagnosticId
,
:
base
(
IDEDiagnosticIds
.
UseExplicitTupleNameDiagnosticId
,
CodeStyleOptions
.
PreferExplicitTupleNames
,
CodeStyleOptions
.
PreferExplicitTupleNames
,
title
:
new
LocalizableResourceString
(
nameof
(
FeaturesResources
.
Use_explicitly_provided_tuple_name
),
FeaturesResources
.
ResourceManager
,
typeof
(
Feature
sResources
)),
title
:
new
LocalizableResourceString
(
nameof
(
AnalyzersResources
.
Use_explicitly_provided_tuple_name
),
AnalyzersResources
.
ResourceManager
,
typeof
(
Analyzer
sResources
)),
messageFormat
:
new
LocalizableResourceString
(
nameof
(
FeaturesResources
.
Prefer_explicitly_provided_tuple_element_name
),
FeaturesResources
.
ResourceManager
,
typeof
(
Feature
sResources
)))
messageFormat
:
new
LocalizableResourceString
(
nameof
(
AnalyzersResources
.
Prefer_explicitly_provided_tuple_element_name
),
AnalyzersResources
.
ResourceManager
,
typeof
(
Analyzer
sResources
)))
{
{
}
}
...
...
src/Analyzers/Core/CodeFixes/CodeFixes.projitems
浏览文件 @
ffa46d06
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCoalesceExpression\UseCoalesceExpressionCodeFixProvider.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCoalesceExpression\UseCoalesceExpressionCodeFixProvider.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCoalesceExpression\UseCoalesceExpressionForNullableCodeFixProvider.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCoalesceExpression\UseCoalesceExpressionForNullableCodeFixProvider.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCollectionInitializer\AbstractUseCollectionInitializerCodeFixProvider.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCollectionInitializer\AbstractUseCollectionInitializerCodeFixProvider.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseExplicitTupleName\UseExplicitTupleNameCodeFixProvider.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseObjectInitializer\AbstractUseObjectInitializerCodeFixProvider.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseObjectInitializer\AbstractUseObjectInitializerCodeFixProvider.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseThrowExpression\UseThrowExpressionCodeFixProvider.cs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseThrowExpression\UseThrowExpressionCodeFixProvider.cs"
/>
...
...
src/
Features/Core/Portable
/UseExplicitTupleName/UseExplicitTupleNameCodeFixProvider.cs
→
src/
Analyzers/Core/CodeFixes
/UseExplicitTupleName/UseExplicitTupleNameCodeFixProvider.cs
浏览文件 @
ffa46d06
...
@@ -57,12 +57,12 @@ public override Task RegisterCodeFixesAsync(CodeFixContext context)
...
@@ -57,12 +57,12 @@ public override Task RegisterCodeFixesAsync(CodeFixContext context)
return
Task
.
CompletedTask
;
return
Task
.
CompletedTask
;
}
}
private
class
MyCodeAction
:
C
odeAction
.
DocumentChangeAction
private
class
MyCodeAction
:
C
ustomCodeActions
.
DocumentChangeAction
{
{
public
MyCodeAction
(
Func
<
CancellationToken
,
Task
<
Document
>>
createChangedDocument
)
public
MyCodeAction
(
Func
<
CancellationToken
,
Task
<
Document
>>
createChangedDocument
)
:
base
(
Feature
sResources
.
Use_explicitly_provided_tuple_name
,
:
base
(
Analyzer
sResources
.
Use_explicitly_provided_tuple_name
,
createChangedDocument
,
createChangedDocument
,
Feature
sResources
.
Use_explicitly_provided_tuple_name
)
Analyzer
sResources
.
Use_explicitly_provided_tuple_name
)
{
{
}
}
}
}
...
...
src/
EditorFeatures/VisualBasicTest
/UseExplicitTupleName/UseExplicitTupleNameTests.vb
→
src/
Analyzers/VisualBasic/Tests
/UseExplicitTupleName/UseExplicitTupleNameTests.vb
浏览文件 @
ffa46d06
文件已移动
src/Analyzers/VisualBasic/Tests/VisualBasicAnalyzers.UnitTests.projitems
浏览文件 @
ffa46d06
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCoalesceExpression\UseCoalesceExpressionForNullableTests.vb"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCoalesceExpression\UseCoalesceExpressionForNullableTests.vb"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCoalesceExpression\UseCoalesceExpressionTests.vb"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCoalesceExpression\UseCoalesceExpressionTests.vb"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCollectionInitializer\UseCollectionInitializerTests.vb"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseCollectionInitializer\UseCollectionInitializerTests.vb"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseExplicitTupleName\UseExplicitTupleNameTests.vb"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseNullPropagation\UseNullPropagationTests.vb"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseNullPropagation\UseNullPropagationTests.vb"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseObjectInitializer\UseObjectInitializerTests.vb"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)UseObjectInitializer\UseObjectInitializerTests.vb"
/>
</ItemGroup>
</ItemGroup>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录