SA1516 doesn't report missing blank line after file scoped namespace
See original GitHub issueThis code:
namespace MyNamespace;
public class MyClass
{
}
doesn’t show SA1516 and SA1513 cannot workaround it.
I would expect that SA1516 is reported for public class MyClass
like it is for namespace MyNamespace;
here:
using System;
namespace MyNamespace;
Tested with StyleCop.Analyzers 1.2.0-beta.435.
Issue Analytics
- State:
- Created a year ago
- Reactions:6
- Comments:9 (2 by maintainers)
Top Results From Across the Web
CSC : warning SA1516: Elements should be separated by ...
I've encountered this problem today aswell. Explicitly adding namespace, class and Main method to Program class helped to solve this.
Read more >SA1516 inconsistency with classic StyleCop when ...
If I separate it with blank line StyleCop Analyzers does not report issues.
Read more >StyleCopAnalyzers/documentation/SA1516.md at master
Cause. Adjacent C# elements are not separated by a blank line. The behavior of this rule can change based on the configuration of...
Read more >Exploring the Usage of Neural Networks for Repairing ...
To do so, the state-of-the-art of static analysis NuGet packages is examined and further used to generate a dataset with diagnostics and.
Read more >StyleCop Rules Documentation
The StyleCop tool provides warnings that indicate style and consistency rule violations in C# code. By default, the tool integrates into Visual Studio...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any plans to merge PR and close this issue? We are using file-scoped namespaces in our project and it would be nice to enforce this rule.
Excellent, I was on the latest version, works fine with the prerelease