Comments (4)
grabbed
from stylecopanalyzers.
I am in the process of implementing this one, and I am wondering about one thing:
- the description of this rule says:
Cause
A parameter within a C# method or indexer call or declaration does not begin on the same line as the previous parameter, or on the next line.
Rule Description
A violation of this rule occurs when there are one or more blank lines between a parameter and the previous parameter.
So my understanding would be that for the example below, I will get just one violation, for parameter s
public static void Fun(int i, int j,
int s)
{
}
However, the original StyleCop reports 2 violations, the second one for parameter j. I think it's incorrect behaviour, my understanding would be that this rule should only check if there are blank lines between parameters. There is SA1117 rule which checks if all parameters are on one line or each one is located on a separate line.
If my understanding of this rule is incorrect, please let me know.
from stylecopanalyzers.
Your understanding is correct. Only report one violation, even for the following:
public static void Fun(int i, int j,
int s, int t)
{
}
from stylecopanalyzers.
Thanks ! 👍
from stylecopanalyzers.
Related Issues (20)
- SA1402 doesn't recognize records HOT 5
- SA1516 is reported between extern alias and global using HOT 5
- Extend SA1129 to cover parameterless struct constructors HOT 1
- SA1015 false positive on object initializer HOT 3
- SA1012 incorrectly reported on opening brace in List Pattern matching HOT 2
- Add option to detect unused using HOT 7
- SA1010 conflicts with SA1024 when invoking a method using named arguments with collection expression HOT 3
- SA1649 code fix (rename file) copies linked files into all referencing projects HOT 1
- New beta? HOT 3
- SA0102 appears to be falsely reported for file scoped namespaces? (1.2.0-beta.556) HOT 1
- SA1122 Inconsistent StyleCopAnalyzers Warning and Compiler Error for Empty Strings in Switch Statements HOT 6
- SA1508 SA1502 SA1500 Nullreference Exception & SA1106 false positive HOT 4
- SA1137 picks the wrong starting indentation
- SA1200 (Using directives must be placed correctly) is firing in file with only global usings
- Code Fix Provider for SA1402 adds extra space
- New Rule Proposal: SA1404 but for ExcludeFromCoverage
- SA1316 should not be reported for tuple deconstruction HOT 7
- Explicit interface implementation triggers access level error HOT 3
- SA1135 throws exception for type keywords HOT 5
- SA1135 inconsistent regarding use of aliases HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stylecopanalyzers.