Skip to content
Closed
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,7 @@ end_of_line = crlf
[src/**/*.{cs,vb}]
# IDE0005: Remove unnecessary usings/imports
dotnet_diagnostic.IDE0005.severity = warning

[.nuget/**/*.cs]
# Instantiate argument exceptions correctly
dotnet_diagnostic.CA2208.severity = suggestion
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be dotnet_diagnostic.severity = suggestion?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm disabling CA2208 specifically so that you can clearly see what rules are violated by the referenced packages.

4 changes: 4 additions & 0 deletions .vsts-dotnet-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ trigger:
- exp/*
- vs*

variables:
- name: NUGET_PACKAGES
value: $(Build.SourcesDirectory)/.nuget/packages

jobs:
- job: BootstrapMSBuildOnFullFrameworkWindows
displayName: "Windows Full"
Expand Down
2 changes: 2 additions & 0 deletions .vsts-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ variables:
value: .NETCore
- name: _DotNetValidationArtifactsCategory
value: .NETCoreValidation
- name: NUGET_PACKAGES
value: $(Build.SourcesDirectory)/.nuget/packages

stages:
- stage: build
Expand Down
4 changes: 4 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<!-- For .editorconfig to apply to sources from NuGet packages -->
<add key="globalPackagesFolder" value="./.nuget/packages" />
</config>
<packageSources>
<clear />
<add key="arcade" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
Expand Down
4 changes: 2 additions & 2 deletions eng/Common.globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ dotnet_diagnostic.CA2153.severity = none
dotnet_diagnostic.CA2201.severity = none

# Instantiate argument exceptions correctly
dotnet_diagnostic.CA2208.severity = suggestion
dotnet_diagnostic.CA2208.severity = warning

# Non-constant fields should not be visible
dotnet_diagnostic.CA2211.severity = none
Expand Down Expand Up @@ -1107,4 +1107,4 @@ dotnet_diagnostic.SA1649.severity = suggestion
dotnet_diagnostic.SA1652.severity = none

# Do not use equality check to check for collection size.
dotnet_diagnostic.xUnit2013.severity = none
dotnet_diagnostic.xUnit2013.severity = none
2 changes: 1 addition & 1 deletion src/Build.OM.UnitTests/TransientIO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public string GetAbsolutePath(string relative)
var absolute = Path.GetFullPath(Path.IsPathRooted(relative) ? relative : Path.Combine(tempRoot, relative));
if (!IsControled(absolute))
{
throw new ArgumentException(nameof(relative));
throw new ArgumentException("Either the path is invalid or it is not rooted to RootFolder.", nameof(relative));
}

return absolute;
Expand Down
3 changes: 2 additions & 1 deletion src/StringTools/InternableString.Simple.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public static string AsSpan<T>(this T[] array, int start, int length)
{
return new string(charArray, start, length);
}
throw new ArgumentException(nameof(array));

throw new ArgumentException("array is not char array.", nameof(array));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/ManifestUtil/TrustInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ public bool IsFullTrust
public PermissionSet PermissionSet
{
get => GetOutputPermissionSet();
set => _outputPermissionSet = value ?? throw new ArgumentNullException("PermissionSet cannot be set to null.");
set => _outputPermissionSet = value ?? throw new ArgumentNullException(nameof(value), "PermissionSet cannot be set to null.");
}
#endif

Expand Down