-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formatting may conflict with StyleCopAnalayzers #13
Comments
We should wait on this until after we decide if we are moving away from SpaceBrace - See #423 |
Also .net 5 has moved to Microsoft.CodeAnalysis.NetAnalyzers, although the rule names may be the same. |
This is the first pass of rules that conflict, some issues were discovered, there are open questions on some of the rules. <Rule Id="SA1009" Action="None" />
<Rule Id="SA1111" Action="None" />
<Rule Id="SA1118" Action="None" />
<Rule Id="SA1501" Action="None" />
<Rule Id="SA1502" Action="None" />
<Rule Id="SA1504" Action="None" />
<Rule Id="SA1137" Action="None" />
<Rule Id="SA1500" Action="None" />
<!-- wants spaces between multiline properties accessors, which does not seem to be a standard. #285 should be implemented though -->
<Rule Id="SA1516" Action="None" />
<!-- see #526 -->
<Rule Id="SA1128" Action="None" />
<!-- see #527 -->
<Rule Id="SA1127" Action="None" />
<!-- probably leave, but add note -->
<!-- forces new line before a comment on a catch of a try/catch
the comment can be moved to the brace above
-->
<Rule Id="SA1513" Action="Warning" />
<!-- conflicts with new(), See https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3214 will be fixed in 1.2 -->
<Rule Id="SA1000" Action="Warning" />
|
SA1500 conflicts with do
{
// something
} while (true); ~60% of do statements in https://github.com/belav/csharpier-repos use that syntax |
Hi, private string a;
public string A
{
get
{
return a + "this is a very long string that is this long so it can force a line break";
}
set { a = value; }
} |
@lara-ec I am adding SA1516 to the list of rules that should be disabled. I am not sure if your intention when reporting it was that csharpier should add the extra line before the set. When I looking into multiline accessors for properties (using https://github.com/belav/csharpier-repos), only 16% of them included a line between them if one of the two spanned multiple lines. I think it makes sense to have csharpier stick to that and remove the empty line. SA1516 is also used to ensure there is a new line between method definitions, which csharpier doesn't currently have an opinion on. See #285. I think it makes sense for csharpier to starting adding the blank lines between methods. 87% of the methods in classes from csharpier-repos have a blank line before them. |
@belav Yes, my intention was to have it on the list. :) I don't have a strong opinion on it, but FWIW I agree with what you say. |
When 0.13.0 is released, I will update the docs with which stylecop rules conflict with csharpier. |
We need to investigate which style cop rules need to be disabled to avoid conflicts with csharpier
The text was updated successfully, but these errors were encountered: