-
Notifications
You must be signed in to change notification settings - Fork 513
Closed
Milestone
Description
Checked using 1.2.0-beta.354 and 1.2.0-beta.333, no config file:
using System;
class C
{
void M(long p)
{
// No warning
Console.WriteLine((int)p);
// ⚠ SA1008 Opening parenthesis should be preceded by a space.
// ⚠ SA1003 Operator '(int)' should be preceded by whitespace.
// ↓
Console.WriteLine(..(int)p);
}
}The messages are confusing, because https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1008.md seems to actually say there should not be a space there.
To show how backwards this is:
using System;
class C
{
void M(long p)
{
// These warnings are good
// ⚠ SA1008 Opening parenthesis should not be preceded by a space.
// ⚠ SA1003 Operator '(int)' should not be preceded by whitespace.
// ↓ ↓
Console.WriteLine( (int)p);
// No warning (but there should be!)
Console.WriteLine(.. (int)p);
}
}