Is there an analyzer to reporting missing parentheses in IF statements?
See original GitHub issueHi StyleCop enthusiasts!
I wonder if there is any analyzer that would catch for me that this line is missing parentheses:
else if (httpResponse.StatusCode >= HttpStatusCode.Ambiguous && httpResponse.StatusCode < HttpStatusCode.BadRequest)
as I would like to enforce this style:
else if ((httpResponse.StatusCode >= HttpStatusCode.Ambiguous) && (httpResponse.StatusCode < HttpStatusCode.BadRequest))
Thank you!
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to detect the position of a missing parenthesis, given ...
This allows you to directly analyze the inputted symbols directly. Now it would be a simple matter to count how many left parentheses...
Read more >Missing Parenthesis in SQL IF Statement?
Hi All,. Not sure what I am missing here in my Sql Statement. I keep getting the [Error] Execution: (ORA-00907: missing right parenthesis...
Read more >[SOLVED] IF statement missing parenthesis in formula
Message received, "your formula is missing --) or (. Check the formula and then add the parenthesis in the appropriate place.
Read more >If statement Error(Missing right parenthesis)
Hello All! I am creating a calculated field using the below if statement to create additional column in my file if((OPSN_PLANNED_QUANTITY=1 ...
Read more >How to properly locate unbalanced parenthesis in source ...
The parenthesis check basically reads the code and updates a counter whenever it hits a parenthesis. If it is an opening bracket, it...
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
This parentheses preference is not enforced because there is only one interpretation that makes sense. In other words, readers are unlikely to read the expression as follows, even if they are new to the C# language:
This is built in VS parentheses preferences
You can add the following to your .editorconfig file: