Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 697 Bytes

File metadata and controls

28 lines (20 loc) · 697 Bytes

GCop 115

"This IF statement is too long for one line. Break the body of the IF into another line"

Rule description

Long statements reduce code readability. Break down the body of if into another line to have a more readable code.

Example1

if (condition) Response.Redirect(string.Format("~/someAddress/someFolders/anotherFolder/{0}/", CurrentShop.Domain));

should be 🡻

if (condition)
   Response.Redirect(string.Format("~/someAddress/someFolders/anotherFolder/{0}/", CurrentShop.Domain));

OR 🡻

if (condition)
{
   Response.Redirect(string.Format("~/someAddress/someFolders/anotherFolder/{0}/", CurrentShop.Domain));
}