Enable SA1000: Keywords should be spaced correctly (#13973)
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1000.md
This commit is contained in:
parent
0fd914fee1
commit
db94377b3a
@ -1012,7 +1012,7 @@ dotnet_diagnostic.SA0001.severity = none
|
||||
dotnet_diagnostic.SA0002.severity = none
|
||||
|
||||
# SA1000: Keywords should be spaced correctly
|
||||
dotnet_diagnostic.SA1000.severity = none
|
||||
dotnet_diagnostic.SA1000.severity = warning
|
||||
|
||||
# SA1001: Commas should be spaced correctly
|
||||
dotnet_diagnostic.SA1001.severity = none
|
||||
|
@ -147,10 +147,10 @@ namespace Microsoft.PowerShell.Commands
|
||||
|
||||
foreach (string path in pathsToProcess)
|
||||
{
|
||||
if(IsBlocked(path))
|
||||
if (IsBlocked(path))
|
||||
{
|
||||
UInt32 result = RemoveXattr(path, MacBlockAttribute, RemovexattrFollowSymLink);
|
||||
if(result != 0)
|
||||
if (result != 0)
|
||||
{
|
||||
string errorMessage = string.Format(CultureInfo.CurrentUICulture, UnblockFileStrings.UnblockError, path);
|
||||
Exception e = new InvalidOperationException(errorMessage);
|
||||
|
@ -102,9 +102,9 @@ namespace Microsoft.PowerShell
|
||||
|
||||
// create cleared region to clear progress bar later
|
||||
_savedRegion = tempProgressRegion;
|
||||
for(int row = 0; row < rows; row++)
|
||||
for (int row = 0; row < rows; row++)
|
||||
{
|
||||
for(int col = 0; col < cols; col++)
|
||||
for (int col = 0; col < cols; col++)
|
||||
{
|
||||
_savedRegion[row, col].Character = ' ';
|
||||
}
|
||||
|
@ -978,7 +978,7 @@ namespace System.Management.Automation
|
||||
string or = string.Empty;
|
||||
string[] regexOptionEnumValues = Enum.GetNames(typeof(System.Text.RegularExpressions.RegexOptions));
|
||||
|
||||
foreach(string regexOption in regexOptionEnumValues)
|
||||
foreach (string regexOption in regexOptionEnumValues)
|
||||
{
|
||||
System.Text.RegularExpressions.RegexOptions option = (System.Text.RegularExpressions.RegexOptions) Enum.Parse(
|
||||
typeof(System.Text.RegularExpressions.RegexOptions),
|
||||
|
@ -13,7 +13,7 @@ namespace TestExe
|
||||
{
|
||||
if (args.Length > 0)
|
||||
{
|
||||
switch(args[0].ToLowerInvariant())
|
||||
switch (args[0].ToLowerInvariant())
|
||||
{
|
||||
case "-echoargs":
|
||||
EchoArgs(args);
|
||||
|
@ -30,12 +30,12 @@ namespace mvc.Controllers
|
||||
if (TryGetRangeHeader(out rangeHeader))
|
||||
{
|
||||
var range = GetRange(rangeHeader);
|
||||
if(range.From != null)
|
||||
if (range.From != null)
|
||||
{
|
||||
from = (int)range.From;
|
||||
}
|
||||
|
||||
if(range.To != null)
|
||||
if (range.To != null)
|
||||
{
|
||||
to = (int)range.To;
|
||||
}
|
||||
@ -49,7 +49,7 @@ namespace mvc.Controllers
|
||||
return;
|
||||
}
|
||||
|
||||
if(to >= FileBytes.Length || from >= FileBytes.Length)
|
||||
if (to >= FileBytes.Length || from >= FileBytes.Length)
|
||||
{
|
||||
Response.StatusCode = StatusCodes.Status416RequestedRangeNotSatisfiable;
|
||||
Response.Headers[HeaderNames.ContentRange] = $"bytes */{FileBytes.Length}";
|
||||
@ -113,7 +113,7 @@ namespace mvc.Controllers
|
||||
private bool TryGetRangeHeader(out string rangeHeader)
|
||||
{
|
||||
var rangeHeaderSv = new StringValues();
|
||||
if(Request.Headers.TryGetValue("Range", out rangeHeaderSv))
|
||||
if (Request.Headers.TryGetValue("Range", out rangeHeaderSv))
|
||||
{
|
||||
rangeHeader = rangeHeaderSv.FirstOrDefault();
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user