StyleCop contradicting rule
Isitar opened this issue · 9 comments
You have a contradicting rule: SA1009: Closing paranthesis must be followed by a space.
and SA1015: Closing generic bracket must not be preceded by a space.
in combinations with generic value-tuples.
Example: var x = new List<(double x, double y)>
There is no way to write this statement without getting a Warning
I think you didn't consider value tuples at all in your rules because I don't think
public (double x, double y) someFunc() ...
should be written public(double x, double y) someFunc() ...
or value deconstruction: var (x, y) = someFunc();
needs to be written var(x, y) = someFunc();
. All this is because of rule SA1008 Opening parenthesis must not be preceded by a space.
And there is another error in it which causes a real error:
SA1101: Prefix local calls with this
I don't know why it pops up in this situation but here is the code:
var abc = (a: "hello", b: "world");
It sais I need to prefix a
and b
with this, but these are not fields, these are tuple value names
It is unfortunate that the package was published with a dependency on Stylecop see #161
The dependency will be removed, in the meantime you can suppress the Stylecop warnings using .ruleset.
Sorry about the inconvenience.
But stylecop is here for development right? I guess this problem will occour in the future when you use value-tuples for any function developing for mathnet-spatial
Ah, ok, yes we opted in to use StyleCop for the code in this library to have things consistent. What I meant is that it was a mistake to publish the package with a dependency as our library should not force opinionated formatting on consuming applications.
Should we reopen this issue?
I think the issue should be reopened since it's a config bug that should be adressed to improve further development
Are there plans to release a new package version without StyleCop?
We should release a new version as soon as possible. We need help from @cdrnet with releasing.
Is this resolved with v0.5.0-beta05?
Yes, look like there is no longer a package dependency.
Hi all! By any chance do we know when this beta package will be released as an official version?