Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
fd965398
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,发现更多精彩内容 >>
未验证
提交
fd965398
编写于
12月 14, 2018
作者:
S
Sam Harwell
提交者:
GitHub
12月 14, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #31142 from sharwell/formatting-analyzer
Enable FormattingAnalyzer
上级
a1f20d62
c621d527
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
59 addition
and
13 deletion
+59
-13
eng/Versions.props
eng/Versions.props
+3
-0
eng/common/tools.ps1
eng/common/tools.ps1
+1
-1
eng/config/rulesets/Shipping.ruleset
eng/config/rulesets/Shipping.ruleset
+3
-0
eng/targets/Imports.targets
eng/targets/Imports.targets
+14
-0
eng/targets/Settings.props
eng/targets/Settings.props
+21
-0
eng/test-build-correctness.ps1
eng/test-build-correctness.ps1
+1
-1
src/CodeStyle/CSharp/Analyzers/Microsoft.CodeAnalysis.CSharp.CodeStyle.csproj
.../Analyzers/Microsoft.CodeAnalysis.CSharp.CodeStyle.csproj
+1
-0
src/CodeStyle/VisualBasic/Analyzers/Microsoft.CodeAnalysis.VisualBasic.CodeStyle.vbproj
...yzers/Microsoft.CodeAnalysis.VisualBasic.CodeStyle.vbproj
+1
-0
src/Compilers/CSharp/Test/Emit/Attributes/AttributeTests_Security.cs
...rs/CSharp/Test/Emit/Attributes/AttributeTests_Security.cs
+1
-1
src/Compilers/CSharp/Test/Emit/Emit/NoPiaEmbedTypes.cs
src/Compilers/CSharp/Test/Emit/Emit/NoPiaEmbedTypes.cs
+5
-0
src/Compilers/VisualBasic/Portable/Symbols/EmbeddedSymbols/EmbeddedSymbolManager.SymbolsCollection.vb
...mbeddedSymbols/EmbeddedSymbolManager.SymbolsCollection.vb
+3
-5
src/Compilers/VisualBasic/Portable/Symbols/Source/SourceMemberContainerTypeSymbol.vb
...ortable/Symbols/Source/SourceMemberContainerTypeSymbol.vb
+5
-5
未找到文件。
eng/Versions.props
浏览文件 @
fd965398
...
...
@@ -30,6 +30,7 @@
<RoslynDiagnosticsNugetPackageVersion>
2.6.2-beta2
</RoslynDiagnosticsNugetPackageVersion>
<CodeStyleLayerCodeAnalysisVersion>
2.8.2
</CodeStyleLayerCodeAnalysisVersion>
<MicrosoftCodeAnalysisTestingVersion>
1.0.0-beta1-63310-01
</MicrosoftCodeAnalysisTestingVersion>
<CodeStyleAnalyzerVersion>
2.11.0-beta2-63603-03
</CodeStyleAnalyzerVersion>
<BasicUndoVersion>
0.9.3
</BasicUndoVersion>
<BenchmarkDotNetVersion>
0.11.1
</BenchmarkDotNetVersion>
...
...
@@ -47,9 +48,11 @@
<MicrosoftCodeAnalysisAnalyzersVersion>
$(RoslynDiagnosticsNugetPackageVersion)
</MicrosoftCodeAnalysisAnalyzersVersion>
<MicrosoftCodeAnalysisBuildTasksVersion>
2.0.0-rc2-61102-09
</MicrosoftCodeAnalysisBuildTasksVersion>
<MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>
$(MicrosoftCodeAnalysisTestingVersion)
</MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>
<MicrosoftCodeAnalysisCSharpCodeStyleVersion>
$(CodeStyleAnalyzerVersion)
</MicrosoftCodeAnalysisCSharpCodeStyleVersion>
<MicrosoftCodeAnalysisElfieVersion>
0.10.6
</MicrosoftCodeAnalysisElfieVersion>
<MicrosoftCodeAnalysisTestResourcesProprietaryVersion>
2.0.14
</MicrosoftCodeAnalysisTestResourcesProprietaryVersion>
<MicrosoftCodeAnalysisVisualBasicCodeFixTestingXUnitVersion>
$(MicrosoftCodeAnalysisTestingVersion)
</MicrosoftCodeAnalysisVisualBasicCodeFixTestingXUnitVersion>
<MicrosoftCodeAnalysisVisualBasicCodeStyleVersion>
$(CodeStyleAnalyzerVersion)
</MicrosoftCodeAnalysisVisualBasicCodeStyleVersion>
<MicrosoftCodeQualityAnalyzersVersion>
$(RoslynDiagnosticsNugetPackageVersion)
</MicrosoftCodeQualityAnalyzersVersion>
<SystemCompositionVersion>
1.0.31
</SystemCompositionVersion>
<MicrosoftCSharpVersion>
4.3.0
</MicrosoftCSharpVersion>
...
...
eng/common/tools.ps1
浏览文件 @
fd965398
...
...
@@ -413,7 +413,7 @@ function MSBuild() {
$cmdArgs
=
"
$(
$buildTool
.
Command
)
/m /nologo /clp:Summary /v:
$verbosity
/nr:
$nodeReuse
"
if
(
$warnAsError
)
{
$cmdArgs
+=
" /
warnaserror /
p:TreatWarningsAsErrors=true"
$cmdArgs
+=
" /p:TreatWarningsAsErrors=true"
}
foreach
(
$arg
in
$args
)
{
...
...
eng/config/rulesets/Shipping.ruleset
浏览文件 @
fd965398
...
...
@@ -69,6 +69,9 @@
<Rule
Id=
"CA5350"
Action=
"None"
/>
<!-- in some cases we must use legacy cryptographic hashes, so disable for now -->
<Rule
Id=
"CA5351"
Action=
"None"
/>
<!-- in some cases we must use legacy cryptographic hashes, so disable for now -->
</Rules>
<Rules
AnalyzerId=
"Microsoft.CodeAnalysis.CodeStyle"
RuleNamespace=
"Microsoft.CodeAnalysis.CodeStyle"
>
<Rule
Id=
"IDE0055"
Action=
"Warning"
/>
</Rules>
<Rules
AnalyzerId=
"Microsoft.CodeAnalysis.Analyzers"
RuleNamespace=
"Microsoft.CodeAnalysis.Analyzers"
>
<Rule
Id=
"RS1001"
Action=
"None"
/>
<Rule
Id=
"RS1002"
Action=
"None"
/>
...
...
eng/targets/Imports.targets
浏览文件 @
fd965398
...
...
@@ -224,4 +224,18 @@
<None
Include=
"$(MSBuildThisFileDirectory)\..\..\src\Setup\PowerShell\install.ps1"
PackagePath=
"tools\install.ps1"
Visible=
"false"
Pack=
"true"
/>
<None
Include=
"$(MSBuildThisFileDirectory)\..\..\src\Setup\PowerShell\uninstall.ps1"
PackagePath=
"tools\uninstall.ps1"
Visible=
"false"
Pack=
"true"
/>
</ItemGroup>
<!--
Ensure TargetFrameworkMonikerAssemblyAttributeText is treated as auto-generated
-->
<Target
Name=
"TreatTargetFrameworkMonikerAssemblyAttributeTextAsGenerated"
AfterTargets=
"_SetTargetFrameworkMonikerAttribute"
Condition=
"'$(Language)' == 'VB'"
>
<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributeText>
'
<
autogenerated/
>
$(TargetFrameworkMonikerAssemblyAttributeText)
</TargetFrameworkMonikerAssemblyAttributeText>
</PropertyGroup>
</Target>
</Project>
eng/targets/Settings.props
浏览文件 @
fd965398
...
...
@@ -29,6 +29,7 @@
<RoslynPortableTargetFrameworks>
net472;netcoreapp2.1
</RoslynPortableTargetFrameworks>
<RoslynPortableRuntimeIdentifiers>
win;win-x64;linux-x64;osx-x64
</RoslynPortableRuntimeIdentifiers>
<RoslynEnforceCodeStyle
Condition=
"'$(ContinuousIntegrationBuild)' != 'true'"
>
true
</RoslynEnforceCodeStyle>
<UseSharedCompilation>
true
</UseSharedCompilation>
<Features>
strict, IOperation
</Features>
...
...
@@ -138,6 +139,26 @@
<PackageReference
Include=
"Microsoft.VisualStudio.Threading.Analyzers"
Version=
"$(MicrosoftVisualStudioThreadingAnalyzersVersion)"
PrivateAssets=
"all"
/>
</ItemGroup>
<!-- Language-specific analyzer packages -->
<Choose>
<When
Condition=
"'$(Language)' == 'VB' and '$(RoslynEnforceCodeStyle)' == 'true'"
>
<ItemGroup>
<PackageReference
Include=
"Microsoft.CodeAnalysis.VisualBasic.CodeStyle"
Version=
"$(MicrosoftCodeAnalysisVisualBasicCodeStyleVersion)"
PrivateAssets=
"all"
/>
</ItemGroup>
</When>
<When
Condition=
"'$(Language)' == 'C#' and '$(RoslynEnforceCodeStyle)' == 'true'"
>
<ItemGroup>
<PackageReference
Include=
"Microsoft.CodeAnalysis.CSharp.CodeStyle"
Version=
"$(MicrosoftCodeAnalysisCSharpCodeStyleVersion)"
PrivateAssets=
"all"
/>
</ItemGroup>
</When>
</Choose>
<PropertyGroup>
<!-- Don't treat FormattingAnalyzer as an error, even when TreatWarningsAsErrors is specified. -->
<WarningsNotAsErrors>
$(WarningsNotAsErrors);IDE0055
</WarningsNotAsErrors>
</PropertyGroup>
<!--
Language specifc settings
-->
...
...
eng/test-build-correctness.ps1
浏览文件 @
fd965398
...
...
@@ -34,7 +34,7 @@ try {
Push-Location
$RepoRoot
Write-Host
"Building Roslyn"
Exec-Block
{
&
(
Join-Path
$PSScriptRoot
"build.ps1"
)
-restore
-build
-ci
:
$ci
-configuration
:
$configuration
-pack
-binaryLog
-useGlobalNuGetCache
:
$false
}
Exec-Block
{
&
(
Join-Path
$PSScriptRoot
"build.ps1"
)
-restore
-build
-ci
:
$ci
-configuration
:
$configuration
-pack
-binaryLog
-useGlobalNuGetCache
:
$false
-properties
"/p:RoslynEnforceCodeStyle=true"
}
# Verify the state of our various build artifacts
...
...
src/CodeStyle/CSharp/Analyzers/Microsoft.CodeAnalysis.CSharp.CodeStyle.csproj
浏览文件 @
fd965398
...
...
@@ -8,6 +8,7 @@
<RootNamespace>
Microsoft.CodeAnalysis.CSharp
</RootNamespace>
<TargetFramework>
netstandard1.3
</TargetFramework>
<DefineConstants>
$(DefineConstants),CODE_STYLE
</DefineConstants>
<PackageId>
Microsoft.CodeAnalysis.CSharp.CodeStyle.NewNameSinceWeReferenceTheAnalyzersAndNuGetCannotFigureItOut
</PackageId>
</PropertyGroup>
<ItemGroup>
<PackageReference
Include=
"Microsoft.CodeAnalysis.CSharp"
Version=
"$(MicrosoftCodeAnalysisCSharpFixedVersion)"
/>
...
...
src/CodeStyle/VisualBasic/Analyzers/Microsoft.CodeAnalysis.VisualBasic.CodeStyle.vbproj
浏览文件 @
fd965398
...
...
@@ -8,6 +8,7 @@
<TargetFramework>
netstandard1.3
</TargetFramework>
<RootNamespace></RootNamespace>
<DefineConstants>
$(DefineConstants),CODE_STYLE
</DefineConstants>
<PackageId>
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.NewNameSinceWeReferenceTheAnalyzersAndNuGetCannotFigureItOut
</PackageId>
</PropertyGroup>
<ItemGroup>
<Compile
Include=
"..\..\..\Workspaces\VisualBasic\Portable\Extensions\SyntaxTokenExtensions_SharedWithCodeStyle.vb"
Link=
"Formatting\SyntaxTokenExtensions_SharedWithCodeStyle.vb"
/>
...
...
src/Compilers/CSharp/Test/Emit/Attributes/AttributeTests_Security.cs
浏览文件 @
fd965398
...
...
@@ -1214,7 +1214,7 @@ public class C
}
"
;
var
compilation
=
CreateCompilationWithMscorlib40
(
source
,
options
:
TestOptions
.
UnsafeReleaseDll
);
CompileAndVerify
(
compilation
,
verify
:
Verification
.
Passes
,
symbolValidator
:
module
=>
CompileAndVerify
(
compilation
,
verify
:
Verification
.
Passes
,
symbolValidator
:
module
=>
{
ValidateDeclSecurity
(
module
,
new
DeclSecurityEntry
{
...
...
src/Compilers/CSharp/Test/Emit/Emit/NoPiaEmbedTypes.cs
浏览文件 @
fd965398
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if !NET472
#pragma warning disable IDE0055 // Fix formatting
#endif
#if NET472
using
Microsoft.Cci
;
...
...
src/Compilers/VisualBasic/Portable/Symbols/EmbeddedSymbols/EmbeddedSymbolManager.SymbolsCollection.vb
浏览文件 @
fd965398
...
...
@@ -132,16 +132,14 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
Public
Sub
MarkSymbolAsReferenced
(
symbol
As
Symbol
,
allSymbols
As
ConcurrentSet
(
Of
Symbol
))
#If Not Debug Then
' In RELEASE don't add anything if the collection is sealed
If
_sealed
=
0
Then
If
_sealed
<>
0
Then
Return
End
If
#End If
Debug
.
Assert
(
symbol
.
IsDefinition
)
Debug
.
Assert
(
symbol
.
IsEmbedded
)
AddReferencedSymbolWithDependents
(
symbol
,
allSymbols
)
#If Not Debug Then
End
If
#End If
End
Sub
Public
Sub
MarkSymbolAsReferenced
(
symbol
As
Symbol
)
...
...
src/Compilers/VisualBasic/Portable/Symbols/Source/SourceMemberContainerTypeSymbol.vb
浏览文件 @
fd965398
...
...
@@ -1714,10 +1714,10 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
End
If
Dim
added
As
Boolean
=
s_SymbolsBuildingMembersAndInitializers
.
Add
(
Me
)
Debug
.
Assert
(
added
)
Try
#End If
Try
' Get type members
Dim
typeMembers
=
GetTypeMembersDictionary
()
...
...
@@ -1738,14 +1738,14 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
membersAndInitializers
.
Members
(
name
)
=
nontypeSymbols
.
Concat
(
StaticCast
(
Of
Symbol
).
From
(
typeSymbols
))
End
If
Next
#If DEBUG Then
Finally
#If DEBUG Then
If
added
Then
s_SymbolsBuildingMembersAndInitializers
.
Remove
(
Me
)
End
If
End
Try
#End If
End
Try
Return
membersAndInitializers
End
Function
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录