-
Notifications
You must be signed in to change notification settings - Fork 510
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
Proposal: SA1118 (ParameterMustNotSpanMultipleLines) exception for method invocations #1597
Comments
👍 |
👍 PLEASE!!! |
It appears this exception was implemented but not documented in StyleCop Classic. |
In addition to For example:
I've got a few occurrences in code where the expression tree is quite complex, so is split over multiple lines. In StyleCop classic this didn't raise a warning, but does using the new analysers. Splitting it into a single line creates a ridiculously long line, and pulling the |
Currently SA1118 documents two exceptions: the first parameter, and any parameter which is an anonymous method.
To improve support for constructing types like
XElement
, I propose adding an additional exception to this rule for method invocations, indexer expressions, and object initializer expressions. Note that the arguments passed to the method, indexer, or constructor must still adhere to this rule.📝 This exception would provide us with an easily-documented resolution to #1596.
The text was updated successfully, but these errors were encountered: